summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/utfileio.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2015-10-19 05:24:38 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-22 03:01:12 +0300
commit92dc96196e96470eb9be7bc3f61f12f1571a2d30 (patch)
treead1c58b113598b35564655b623d252b293256a1b /drivers/acpi/acpica/utfileio.c
parent69058ddf28ce86296b1526d0953417f29b6df179 (diff)
downloadlinux-92dc96196e96470eb9be7bc3f61f12f1571a2d30.tar.xz
ACPICA: Update exception code for "file not found" error
ACPICA commit ac1564c26d239348ef13455f61d5616f3961ff43 Used by the ACPICA applications. This patch is a bit broken due to non-portable <errno.h> inclusion as on some platforms, there is no such a header file for their lib-c exports. Fortunately, Linux doesn't compile utfileio.c for either the kernel space ACPICA core (drivers/acpi/acpica) or the userspace ACPICA tools (tools/power/acpi) for now, so it's safe to leave this patch as it is. Link: https://github.com/acpica/acpica/commit/ac1564c2 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/utfileio.c')
-rw-r--r--drivers/acpi/acpica/utfileio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/utfileio.c b/drivers/acpi/acpica/utfileio.c
index 75a94f52b4be..d435b7b7eb94 100644
--- a/drivers/acpi/acpica/utfileio.c
+++ b/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"
@@ -301,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);
}