summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/acpi/acpica/utfileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/acpi/acpica/utfileio.c')
-rw-r--r--kernel/drivers/acpi/acpica/utfileio.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/drivers/acpi/acpica/utfileio.c b/kernel/drivers/acpi/acpica/utfileio.c
index 7e1168be3..d435b7b7e 100644
--- a/kernel/drivers/acpi/acpica/utfileio.c
+++ b/kernel/drivers/acpi/acpica/utfileio.c
@@ -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);