ACPICA: Clib: Eliminate acpi_os_XXXFile()/acpi_log_error and link clibrary fxxx(...
[cascardo/linux.git] / tools / power / acpi / tools / acpidump / apmain.c
index 17ce0d7..f32968e 100644 (file)
@@ -139,8 +139,8 @@ static int ap_insert_action(char *argument, u32 to_be_done)
 
        current_action++;
        if (current_action > AP_MAX_ACTIONS) {
-               acpi_log_error("Too many table options (max %u)\n",
-                              AP_MAX_ACTIONS);
+               fprintf(stderr, "Too many table options (max %u)\n",
+                       AP_MAX_ACTIONS);
                return (-1);
        }
 
@@ -185,9 +185,9 @@ static int ap_do_options(int argc, char **argv)
                        } else if (!strcmp(acpi_gbl_optarg, "off")) {
                                gbl_dump_customized_tables = FALSE;
                        } else {
-                               acpi_log_error
-                                   ("%s: Cannot handle this switch, please use on|off\n",
-                                    acpi_gbl_optarg);
+                               fprintf(stderr,
+                                       "%s: Cannot handle this switch, please use on|off\n",
+                                       acpi_gbl_optarg);
                                return (-1);
                        }
                        continue;
@@ -212,9 +212,9 @@ static int ap_do_options(int argc, char **argv)
                                              ACPI_MAX64_BYTE_WIDTH,
                                              &gbl_rsdp_base);
                        if (ACPI_FAILURE(status)) {
-                               acpi_log_error
-                                   ("%s: Could not convert to a physical address\n",
-                                    acpi_gbl_optarg);
+                               fprintf(stderr,
+                                       "%s: Could not convert to a physical address\n",
+                                       acpi_gbl_optarg);
                                return (-1);
                        }
                        continue;
@@ -241,7 +241,7 @@ static int ap_do_options(int argc, char **argv)
                case 'z':       /* Verbose mode */
 
                        gbl_verbose_mode = TRUE;
-                       acpi_log_error(ACPI_COMMON_SIGNON(AP_UTILITY_NAME));
+                       fprintf(stderr, ACPI_COMMON_SIGNON(AP_UTILITY_NAME));
                        continue;
 
                        /*
@@ -353,8 +353,9 @@ int ACPI_SYSTEM_XFACE acpi_main(int argc, char *argv[])
 
                default:
 
-                       acpi_log_error("Internal error, invalid action: 0x%X\n",
-                                      action->to_be_done);
+                       fprintf(stderr,
+                               "Internal error, invalid action: 0x%X\n",
+                               action->to_be_done);
                        return (-1);
                }
 
@@ -369,12 +370,12 @@ int ACPI_SYSTEM_XFACE acpi_main(int argc, char *argv[])
                        /* Summary for the output file */
 
                        file_size = cm_get_file_size(gbl_output_file);
-                       acpi_log_error
-                           ("Output file %s contains 0x%X (%u) bytes\n\n",
-                            gbl_output_filename, file_size, file_size);
+                       fprintf(stderr,
+                               "Output file %s contains 0x%X (%u) bytes\n\n",
+                               gbl_output_filename, file_size, file_size);
                }
 
-               acpi_os_close_file(gbl_output_file);
+               fclose(gbl_output_file);
        }
 
        return (status);