Commit 92dc9619 authored by Bob Moore's avatar Bob Moore Committed by Rafael J. Wysocki

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/ac1564c2Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 69058ddf
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "accommon.h" #include "accommon.h"
#include "actables.h" #include "actables.h"
#include "acapps.h" #include "acapps.h"
#include "errno.h"
#ifdef ACPI_ASL_COMPILER #ifdef ACPI_ASL_COMPILER
#include "aslcompiler.h" #include "aslcompiler.h"
...@@ -301,6 +302,11 @@ acpi_ut_read_table_from_file(char *filename, struct acpi_table_header ** table) ...@@ -301,6 +302,11 @@ acpi_ut_read_table_from_file(char *filename, struct acpi_table_header ** table)
file = fopen(filename, "rb"); file = fopen(filename, "rb");
if (!file) { if (!file) {
perror("Could not open input file"); perror("Could not open input file");
if (errno == ENOENT) {
return (AE_NOT_EXIST);
}
return (status); return (status);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment