diff mbox

Enable ACPI table dumping for non-x86 systems (LP: #1260470)

Message ID 1386878091-27193-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Dec. 12, 2013, 7:54 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

We now have non-x86 systems (such as ACPI enabled 64 bit ARM
devices) that support ACPI, so we should turn on the ACPI table
dump for non-x86 systems.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_dump.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Ivan Hu Dec. 16, 2013, 3:14 a.m. UTC | #1
On 12/13/2013 03:54 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> We now have non-x86 systems (such as ACPI enabled 64 bit ARM
> devices) that support ACPI, so we should turn on the ACPI table
> dump for non-x86 systems.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/src/fwts_dump.c | 7 +------
>   1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/src/lib/src/fwts_dump.c b/src/lib/src/fwts_dump.c
> index 532ff58..9cbe936 100644
> --- a/src/lib/src/fwts_dump.c
> +++ b/src/lib/src/fwts_dump.c
> @@ -134,7 +134,6 @@ static int dump_lspci(fwts_framework *fw)
>   	return dump_exec("lspci.log", command);
>   }
>
> -#ifdef FWTS_ARCH_INTEL
>   /*
>    *  dump_acpi_table()
>    *	hex dump of a ACPI table
> @@ -185,7 +184,6 @@ static int dump_acpi_tables(fwts_framework *fw)
>
>   	return FWTS_OK;
>   }
> -#endif
>
>   /*
>    *  dump_readme()
> @@ -232,9 +230,8 @@ static int dump_readme(void)
>   int fwts_dump_info(fwts_framework *fw)
>   {
>   	char path[PATH_MAX+1];
> -#ifdef FWTS_ARCH_INTEL
>   	bool root_priv = (fwts_check_root_euid(fw, false) == FWTS_OK);
> -#endif
> +
>   	if (getcwd(path, PATH_MAX) == NULL)
>   		strcpy(path, "./");
>
> @@ -268,7 +265,6 @@ int fwts_dump_info(fwts_framework *fw)
>   	else
>   		printf("Dumped lspci data to lspci.log\n");
>
> -#ifdef FWTS_ARCH_INTEL
>   	if (root_priv) {
>   		if (dump_acpi_tables(fw) != FWTS_OK)
>   			fprintf(stderr, "Failed to dump ACPI tables.\n");
> @@ -276,7 +272,6 @@ int fwts_dump_info(fwts_framework *fw)
>   			printf("Dumped ACPI tables to acpidump.log\n");
>   	} else
>   		fprintf(stderr, "Need root privilege to dump ACPI tables.\n");
> -#endif
>
>   	return FWTS_OK;
>   }
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>
Keng-Yu Lin Dec. 20, 2013, 9:15 a.m. UTC | #2
On Mon, Dec 16, 2013 at 11:14 AM, IvanHu <ivan.hu@canonical.com> wrote:
> On 12/13/2013 03:54 AM, Colin King wrote:
>>
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> We now have non-x86 systems (such as ACPI enabled 64 bit ARM
>> devices) that support ACPI, so we should turn on the ACPI table
>> dump for non-x86 systems.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>>   src/lib/src/fwts_dump.c | 7 +------
>>   1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/src/lib/src/fwts_dump.c b/src/lib/src/fwts_dump.c
>> index 532ff58..9cbe936 100644
>> --- a/src/lib/src/fwts_dump.c
>> +++ b/src/lib/src/fwts_dump.c
>> @@ -134,7 +134,6 @@ static int dump_lspci(fwts_framework *fw)
>>         return dump_exec("lspci.log", command);
>>   }
>>
>> -#ifdef FWTS_ARCH_INTEL
>>   /*
>>    *  dump_acpi_table()
>>    *    hex dump of a ACPI table
>> @@ -185,7 +184,6 @@ static int dump_acpi_tables(fwts_framework *fw)
>>
>>         return FWTS_OK;
>>   }
>> -#endif
>>
>>   /*
>>    *  dump_readme()
>> @@ -232,9 +230,8 @@ static int dump_readme(void)
>>   int fwts_dump_info(fwts_framework *fw)
>>   {
>>         char path[PATH_MAX+1];
>> -#ifdef FWTS_ARCH_INTEL
>>         bool root_priv = (fwts_check_root_euid(fw, false) == FWTS_OK);
>> -#endif
>> +
>>         if (getcwd(path, PATH_MAX) == NULL)
>>                 strcpy(path, "./");
>>
>> @@ -268,7 +265,6 @@ int fwts_dump_info(fwts_framework *fw)
>>         else
>>                 printf("Dumped lspci data to lspci.log\n");
>>
>> -#ifdef FWTS_ARCH_INTEL
>>         if (root_priv) {
>>                 if (dump_acpi_tables(fw) != FWTS_OK)
>>                         fprintf(stderr, "Failed to dump ACPI tables.\n");
>> @@ -276,7 +272,6 @@ int fwts_dump_info(fwts_framework *fw)
>>                         printf("Dumped ACPI tables to acpidump.log\n");
>>         } else
>>                 fprintf(stderr, "Need root privilege to dump ACPI
>> tables.\n");
>> -#endif
>>
>>         return FWTS_OK;
>>   }
>>
>
> Acked-by: Ivan Hu <ivan.hu@canonical.com>
>

Acked-by: Keng-Yu Lin <kengyu@canonical.com>
diff mbox

Patch

diff --git a/src/lib/src/fwts_dump.c b/src/lib/src/fwts_dump.c
index 532ff58..9cbe936 100644
--- a/src/lib/src/fwts_dump.c
+++ b/src/lib/src/fwts_dump.c
@@ -134,7 +134,6 @@  static int dump_lspci(fwts_framework *fw)
 	return dump_exec("lspci.log", command);
 }
 
-#ifdef FWTS_ARCH_INTEL
 /*
  *  dump_acpi_table()
  *	hex dump of a ACPI table
@@ -185,7 +184,6 @@  static int dump_acpi_tables(fwts_framework *fw)
 
 	return FWTS_OK;
 }
-#endif
 
 /*
  *  dump_readme()
@@ -232,9 +230,8 @@  static int dump_readme(void)
 int fwts_dump_info(fwts_framework *fw)
 {
 	char path[PATH_MAX+1];
-#ifdef FWTS_ARCH_INTEL
 	bool root_priv = (fwts_check_root_euid(fw, false) == FWTS_OK);
-#endif
+
 	if (getcwd(path, PATH_MAX) == NULL)
 		strcpy(path, "./");
 
@@ -268,7 +265,6 @@  int fwts_dump_info(fwts_framework *fw)
 	else
 		printf("Dumped lspci data to lspci.log\n");
 
-#ifdef FWTS_ARCH_INTEL
 	if (root_priv) {
 		if (dump_acpi_tables(fw) != FWTS_OK)
 			fprintf(stderr, "Failed to dump ACPI tables.\n");
@@ -276,7 +272,6 @@  int fwts_dump_info(fwts_framework *fw)
 			printf("Dumped ACPI tables to acpidump.log\n");
 	} else
 		fprintf(stderr, "Need root privilege to dump ACPI tables.\n");
-#endif
 
 	return FWTS_OK;
 }