These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / acpi / acpica / utfileio.c
index 7e1168b..d435b7b 100644 (file)
@@ -45,6 +45,7 @@
 #include "accommon.h"
 #include "actables.h"
 #include "acapps.h"
+#include "errno.h"
 
 #ifdef ACPI_ASL_COMPILER
 #include "aslcompiler.h"
@@ -198,11 +199,8 @@ acpi_ut_read_table(FILE * fp,
                             table_header.length, file_size);
 
 #ifdef ACPI_ASL_COMPILER
-                       status = fl_check_for_ascii(fp, NULL, FALSE);
-                       if (ACPI_SUCCESS(status)) {
-                               acpi_os_printf
-                                   ("File appears to be ASCII only, must be binary\n");
-                       }
+                       acpi_os_printf("File is corrupt or is ASCII text -- "
+                                      "it must be a binary file\n");
 #endif
                        return (AE_BAD_HEADER);
                }
@@ -304,6 +302,11 @@ acpi_ut_read_table_from_file(char *filename, struct acpi_table_header ** table)
        file = fopen(filename, "rb");
        if (!file) {
                perror("Could not open input file");
+
+               if (errno == ENOENT) {
+                       return (AE_NOT_EXIST);
+               }
+
                return (status);
        }
 
@@ -315,7 +318,7 @@ acpi_ut_read_table_from_file(char *filename, struct acpi_table_header ** table)
        /* Get the entire file */
 
        fprintf(stderr,
-               "Loading Acpi table from file %10s - Length %.8u (%06X)\n",
+               "Reading ACPI table from file %12s - Length %.8u (0x%06X)\n",
                filename, file_size, file_size);
 
        status = acpi_ut_read_table(file, table, &table_length);