diff options
author | Bob Moore <robert.moore@intel.com> | 2012-12-30 19:05:09 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-10 06:36:19 -0500 |
commit | 528a412c86e7a831d0fd157cac65749b45b64e06 (patch) | |
tree | f667eada3a528c512311a5edeb8252c7f542d720 | |
parent | afb1bbee804f473f70dc890a94cb9f0acc358012 (diff) |
ACPICA: Change exception code for LoadTable operator.
For the case where one of the input strings is too long,
change the returned exception code from AE_BAD_PARAMETER to
AE_AML_STRING_LIMIT.
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>
-rw-r--r-- | drivers/acpi/acpica/exconfig.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c index d0cc2a40edfb..f214dbfc4047 100644 --- a/drivers/acpi/acpica/exconfig.c +++ b/drivers/acpi/acpica/exconfig.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include "actables.h" | 48 | #include "actables.h" |
49 | #include "acdispat.h" | 49 | #include "acdispat.h" |
50 | #include "acevents.h" | 50 | #include "acevents.h" |
51 | #include "amlcode.h" | ||
51 | 52 | ||
52 | #define _COMPONENT ACPI_EXECUTER | 53 | #define _COMPONENT ACPI_EXECUTER |
53 | ACPI_MODULE_NAME("exconfig") | 54 | ACPI_MODULE_NAME("exconfig") |
@@ -166,7 +167,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, | |||
166 | if ((operand[0]->string.length > ACPI_NAME_SIZE) || | 167 | if ((operand[0]->string.length > ACPI_NAME_SIZE) || |
167 | (operand[1]->string.length > ACPI_OEM_ID_SIZE) || | 168 | (operand[1]->string.length > ACPI_OEM_ID_SIZE) || |
168 | (operand[2]->string.length > ACPI_OEM_TABLE_ID_SIZE)) { | 169 | (operand[2]->string.length > ACPI_OEM_TABLE_ID_SIZE)) { |
169 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 170 | return_ACPI_STATUS(AE_AML_STRING_LIMIT); |
170 | } | 171 | } |
171 | 172 | ||
172 | /* Find the ACPI table in the RSDT/XSDT */ | 173 | /* Find the ACPI table in the RSDT/XSDT */ |
@@ -213,8 +214,8 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, | |||
213 | /* parameter_path (optional parameter) */ | 214 | /* parameter_path (optional parameter) */ |
214 | 215 | ||
215 | if (operand[4]->string.length > 0) { | 216 | if (operand[4]->string.length > 0) { |
216 | if ((operand[4]->string.pointer[0] != '\\') && | 217 | if ((operand[4]->string.pointer[0] != AML_ROOT_PREFIX) && |
217 | (operand[4]->string.pointer[0] != '^')) { | 218 | (operand[4]->string.pointer[0] != AML_PARENT_PREFIX)) { |
218 | /* | 219 | /* |
219 | * Path is not absolute, so it will be relative to the node | 220 | * Path is not absolute, so it will be relative to the node |
220 | * referenced by the root_path_string (or the NS root if omitted) | 221 | * referenced by the root_path_string (or the NS root if omitted) |