diff options
author | Lv Zheng <lv.zheng@intel.com> | 2015-07-01 02:44:58 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-07-01 17:17:55 -0400 |
commit | 4fb80c3769b707524b0f2f6843633c6bd2131afc (patch) | |
tree | 64167f7878177abc2f61bc5bf3f9474bf05cc611 | |
parent | 428394dfdfc4596110269873cf5a2e7d82b2422e (diff) |
ACPICA: acpidump: Convert the default behavior to dump from /sys/firmware/acpi/tables
ACPICA commit 04c3bd7e9d6aeb2b3edebe99c90dc271ae4e6353
In order to work without any additional option to dump tables when /dev/mem
doesn't exist, this patch switches the default behavior of acpidump to dump
from /sys/firmware/acpi/tables. Reported by Al Stone, Fixed by Lv Zheng.
Link: https://github.com/acpica/acpica/commit/04c3bd7e
Reported-by: Al Stone <ahs3@redhat.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | tools/power/acpi/tools/acpidump/acpidump.h | 2 | ||||
-rw-r--r-- | tools/power/acpi/tools/acpidump/apmain.c | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/tools/power/acpi/tools/acpidump/acpidump.h b/tools/power/acpi/tools/acpidump/acpidump.h index 84bdef0136cb..eed534481434 100644 --- a/tools/power/acpi/tools/acpidump/acpidump.h +++ b/tools/power/acpi/tools/acpidump/acpidump.h | |||
@@ -66,7 +66,7 @@ | |||
66 | EXTERN u8 INIT_GLOBAL(gbl_summary_mode, FALSE); | 66 | EXTERN u8 INIT_GLOBAL(gbl_summary_mode, FALSE); |
67 | EXTERN u8 INIT_GLOBAL(gbl_verbose_mode, FALSE); | 67 | EXTERN u8 INIT_GLOBAL(gbl_verbose_mode, FALSE); |
68 | EXTERN u8 INIT_GLOBAL(gbl_binary_mode, FALSE); | 68 | EXTERN u8 INIT_GLOBAL(gbl_binary_mode, FALSE); |
69 | EXTERN u8 INIT_GLOBAL(gbl_dump_customized_tables, FALSE); | 69 | EXTERN u8 INIT_GLOBAL(gbl_dump_customized_tables, TRUE); |
70 | EXTERN u8 INIT_GLOBAL(gbl_do_not_dump_xsdt, FALSE); | 70 | EXTERN u8 INIT_GLOBAL(gbl_do_not_dump_xsdt, FALSE); |
71 | EXTERN ACPI_FILE INIT_GLOBAL(gbl_output_file, NULL); | 71 | EXTERN ACPI_FILE INIT_GLOBAL(gbl_output_file, NULL); |
72 | EXTERN char INIT_GLOBAL(*gbl_output_filename, NULL); | 72 | EXTERN char INIT_GLOBAL(*gbl_output_filename, NULL); |
diff --git a/tools/power/acpi/tools/acpidump/apmain.c b/tools/power/acpi/tools/acpidump/apmain.c index d0ba6535f5af..57620f66ae6c 100644 --- a/tools/power/acpi/tools/acpidump/apmain.c +++ b/tools/power/acpi/tools/acpidump/apmain.c | |||
@@ -80,7 +80,7 @@ struct ap_dump_action action_table[AP_MAX_ACTIONS]; | |||
80 | u32 current_action = 0; | 80 | u32 current_action = 0; |
81 | 81 | ||
82 | #define AP_UTILITY_NAME "ACPI Binary Table Dump Utility" | 82 | #define AP_UTILITY_NAME "ACPI Binary Table Dump Utility" |
83 | #define AP_SUPPORTED_OPTIONS "?a:bcf:hn:o:r:svxz" | 83 | #define AP_SUPPORTED_OPTIONS "?a:bc:f:hn:o:r:svxz" |
84 | 84 | ||
85 | /****************************************************************************** | 85 | /****************************************************************************** |
86 | * | 86 | * |
@@ -96,7 +96,6 @@ static void ap_display_usage(void) | |||
96 | ACPI_USAGE_HEADER("acpidump [options]"); | 96 | ACPI_USAGE_HEADER("acpidump [options]"); |
97 | 97 | ||
98 | ACPI_OPTION("-b", "Dump tables to binary files"); | 98 | ACPI_OPTION("-b", "Dump tables to binary files"); |
99 | ACPI_OPTION("-c", "Dump customized tables"); | ||
100 | ACPI_OPTION("-h -?", "This help message"); | 99 | ACPI_OPTION("-h -?", "This help message"); |
101 | ACPI_OPTION("-o <File>", "Redirect output to file"); | 100 | ACPI_OPTION("-o <File>", "Redirect output to file"); |
102 | ACPI_OPTION("-r <Address>", "Dump tables from specified RSDP"); | 101 | ACPI_OPTION("-r <Address>", "Dump tables from specified RSDP"); |
@@ -107,6 +106,7 @@ static void ap_display_usage(void) | |||
107 | ACPI_USAGE_TEXT("\nTable Options:\n"); | 106 | ACPI_USAGE_TEXT("\nTable Options:\n"); |
108 | 107 | ||
109 | ACPI_OPTION("-a <Address>", "Get table via a physical address"); | 108 | ACPI_OPTION("-a <Address>", "Get table via a physical address"); |
109 | ACPI_OPTION("-c <on|off>", "Turning on/off customized table dumping"); | ||
110 | ACPI_OPTION("-f <BinaryFile>", "Get table via a binary file"); | 110 | ACPI_OPTION("-f <BinaryFile>", "Get table via a binary file"); |
111 | ACPI_OPTION("-n <Signature>", "Get table via a name/signature"); | 111 | ACPI_OPTION("-n <Signature>", "Get table via a name/signature"); |
112 | ACPI_OPTION("-x", "Do not use but dump XSDT"); | 112 | ACPI_OPTION("-x", "Do not use but dump XSDT"); |
@@ -181,7 +181,16 @@ static int ap_do_options(int argc, char **argv) | |||
181 | 181 | ||
182 | case 'c': /* Dump customized tables */ | 182 | case 'c': /* Dump customized tables */ |
183 | 183 | ||
184 | gbl_dump_customized_tables = TRUE; | 184 | if (!strcmp(acpi_gbl_optarg, "on")) { |
185 | gbl_dump_customized_tables = TRUE; | ||
186 | } else if (!strcmp(acpi_gbl_optarg, "off")) { | ||
187 | gbl_dump_customized_tables = FALSE; | ||
188 | } else { | ||
189 | acpi_log_error | ||
190 | ("%s: Cannot handle this switch, please use on|off\n", | ||
191 | acpi_gbl_optarg); | ||
192 | return (-1); | ||
193 | } | ||
185 | continue; | 194 | continue; |
186 | 195 | ||
187 | case 'h': | 196 | case 'h': |