diff options
Diffstat (limited to 'tools/power/acpi/tools/acpidump/apmain.c')
-rw-r--r-- | tools/power/acpi/tools/acpidump/apmain.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/tools/power/acpi/tools/acpidump/apmain.c b/tools/power/acpi/tools/acpidump/apmain.c index 7692e6b887e1..7ff46be908f0 100644 --- a/tools/power/acpi/tools/acpidump/apmain.c +++ b/tools/power/acpi/tools/acpidump/apmain.c | |||
@@ -43,7 +43,6 @@ | |||
43 | 43 | ||
44 | #define _DECLARE_GLOBALS | 44 | #define _DECLARE_GLOBALS |
45 | #include "acpidump.h" | 45 | #include "acpidump.h" |
46 | #include "acapps.h" | ||
47 | 46 | ||
48 | /* | 47 | /* |
49 | * acpidump - A portable utility for obtaining system ACPI tables and dumping | 48 | * acpidump - A portable utility for obtaining system ACPI tables and dumping |
@@ -140,8 +139,8 @@ static int ap_insert_action(char *argument, u32 to_be_done) | |||
140 | 139 | ||
141 | current_action++; | 140 | current_action++; |
142 | if (current_action > AP_MAX_ACTIONS) { | 141 | if (current_action > AP_MAX_ACTIONS) { |
143 | acpi_log_error("Too many table options (max %u)\n", | 142 | fprintf(stderr, "Too many table options (max %u)\n", |
144 | AP_MAX_ACTIONS); | 143 | AP_MAX_ACTIONS); |
145 | return (-1); | 144 | return (-1); |
146 | } | 145 | } |
147 | 146 | ||
@@ -186,9 +185,9 @@ static int ap_do_options(int argc, char **argv) | |||
186 | } else if (!strcmp(acpi_gbl_optarg, "off")) { | 185 | } else if (!strcmp(acpi_gbl_optarg, "off")) { |
187 | gbl_dump_customized_tables = FALSE; | 186 | gbl_dump_customized_tables = FALSE; |
188 | } else { | 187 | } else { |
189 | acpi_log_error | 188 | fprintf(stderr, |
190 | ("%s: Cannot handle this switch, please use on|off\n", | 189 | "%s: Cannot handle this switch, please use on|off\n", |
191 | acpi_gbl_optarg); | 190 | acpi_gbl_optarg); |
192 | return (-1); | 191 | return (-1); |
193 | } | 192 | } |
194 | continue; | 193 | continue; |
@@ -209,13 +208,13 @@ static int ap_do_options(int argc, char **argv) | |||
209 | case 'r': /* Dump tables from specified RSDP */ | 208 | case 'r': /* Dump tables from specified RSDP */ |
210 | 209 | ||
211 | status = | 210 | status = |
212 | acpi_ut_strtoul64(acpi_gbl_optarg, ACPI_ANY_BASE, | 211 | acpi_ut_strtoul64(acpi_gbl_optarg, |
213 | ACPI_MAX64_BYTE_WIDTH, | 212 | ACPI_STRTOUL_64BIT, |
214 | &gbl_rsdp_base); | 213 | &gbl_rsdp_base); |
215 | if (ACPI_FAILURE(status)) { | 214 | if (ACPI_FAILURE(status)) { |
216 | acpi_log_error | 215 | fprintf(stderr, |
217 | ("%s: Could not convert to a physical address\n", | 216 | "%s: Could not convert to a physical address\n", |
218 | acpi_gbl_optarg); | 217 | acpi_gbl_optarg); |
219 | return (-1); | 218 | return (-1); |
220 | } | 219 | } |
221 | continue; | 220 | continue; |
@@ -242,7 +241,7 @@ static int ap_do_options(int argc, char **argv) | |||
242 | case 'z': /* Verbose mode */ | 241 | case 'z': /* Verbose mode */ |
243 | 242 | ||
244 | gbl_verbose_mode = TRUE; | 243 | gbl_verbose_mode = TRUE; |
245 | acpi_log_error(ACPI_COMMON_SIGNON(AP_UTILITY_NAME)); | 244 | fprintf(stderr, ACPI_COMMON_SIGNON(AP_UTILITY_NAME)); |
246 | continue; | 245 | continue; |
247 | 246 | ||
248 | /* | 247 | /* |
@@ -315,6 +314,7 @@ int ACPI_SYSTEM_XFACE acpi_main(int argc, char *argv[]) | |||
315 | ACPI_DEBUG_INITIALIZE(); /* For debug version only */ | 314 | ACPI_DEBUG_INITIALIZE(); /* For debug version only */ |
316 | acpi_os_initialize(); | 315 | acpi_os_initialize(); |
317 | gbl_output_file = ACPI_FILE_OUT; | 316 | gbl_output_file = ACPI_FILE_OUT; |
317 | acpi_gbl_integer_byte_width = 8; | ||
318 | 318 | ||
319 | /* Process command line options */ | 319 | /* Process command line options */ |
320 | 320 | ||
@@ -353,8 +353,9 @@ int ACPI_SYSTEM_XFACE acpi_main(int argc, char *argv[]) | |||
353 | 353 | ||
354 | default: | 354 | default: |
355 | 355 | ||
356 | acpi_log_error("Internal error, invalid action: 0x%X\n", | 356 | fprintf(stderr, |
357 | action->to_be_done); | 357 | "Internal error, invalid action: 0x%X\n", |
358 | action->to_be_done); | ||
358 | return (-1); | 359 | return (-1); |
359 | } | 360 | } |
360 | 361 | ||
@@ -369,12 +370,12 @@ int ACPI_SYSTEM_XFACE acpi_main(int argc, char *argv[]) | |||
369 | /* Summary for the output file */ | 370 | /* Summary for the output file */ |
370 | 371 | ||
371 | file_size = cm_get_file_size(gbl_output_file); | 372 | file_size = cm_get_file_size(gbl_output_file); |
372 | acpi_log_error | 373 | fprintf(stderr, |
373 | ("Output file %s contains 0x%X (%u) bytes\n\n", | 374 | "Output file %s contains 0x%X (%u) bytes\n\n", |
374 | gbl_output_filename, file_size, file_size); | 375 | gbl_output_filename, file_size, file_size); |
375 | } | 376 | } |
376 | 377 | ||
377 | acpi_os_close_file(gbl_output_file); | 378 | fclose(gbl_output_file); |
378 | } | 379 | } |
379 | 380 | ||
380 | return (status); | 381 | return (status); |