diff options
author | Bob Moore <robert.moore@intel.com> | 2012-05-22 04:26:53 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-06-01 11:51:52 -0400 |
commit | c6e1733e6fc384ff1a219d7dfcb8b072030ae792 (patch) | |
tree | ae21cf8ec14697e9c030fda0d18f51e16372e9d1 /drivers/acpi/acpica | |
parent | 43e1c6892c88ae0730cb0eb7bd5a2812b960c32a (diff) |
ACPICA: iASL: Improved pathname support
For include files, merge the prefix pathname with the file
pathname. Convert backslashes in all pathnames to forward
slashes, for readability. Include file pathname changes affect
both #include and Include() type operators.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r-- | drivers/acpi/acpica/acutils.h | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/utmisc.c | 29 |
2 files changed, 31 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index 925ccf22101b..5035327ebccc 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h | |||
@@ -460,6 +460,8 @@ acpi_ut_short_divide(u64 in_dividend, | |||
460 | /* | 460 | /* |
461 | * utmisc | 461 | * utmisc |
462 | */ | 462 | */ |
463 | void ut_convert_backslashes(char *pathname); | ||
464 | |||
463 | const char *acpi_ut_validate_exception(acpi_status status); | 465 | const char *acpi_ut_validate_exception(acpi_status status); |
464 | 466 | ||
465 | u8 acpi_ut_is_pci_root_bridge(char *id); | 467 | u8 acpi_ut_is_pci_root_bridge(char *id); |
diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c index 86f19db74e05..e86f897767e8 100644 --- a/drivers/acpi/acpica/utmisc.c +++ b/drivers/acpi/acpica/utmisc.c | |||
@@ -52,6 +52,34 @@ ACPI_MODULE_NAME("utmisc") | |||
52 | 52 | ||
53 | /******************************************************************************* | 53 | /******************************************************************************* |
54 | * | 54 | * |
55 | * FUNCTION: ut_convert_backslashes | ||
56 | * | ||
57 | * PARAMETERS: Pathname - File pathname string to be converted | ||
58 | * | ||
59 | * RETURN: Modifies the input Pathname | ||
60 | * | ||
61 | * DESCRIPTION: Convert all backslashes (0x5C) to forward slashes (0x2F) within | ||
62 | * the entire input file pathname string. | ||
63 | * | ||
64 | ******************************************************************************/ | ||
65 | void ut_convert_backslashes(char *pathname) | ||
66 | { | ||
67 | |||
68 | if (!pathname) { | ||
69 | return; | ||
70 | } | ||
71 | |||
72 | while (*pathname) { | ||
73 | if (*pathname == '\\') { | ||
74 | *pathname = '/'; | ||
75 | } | ||
76 | |||
77 | pathname++; | ||
78 | } | ||
79 | } | ||
80 | |||
81 | /******************************************************************************* | ||
82 | * | ||
55 | * FUNCTION: acpi_ut_validate_exception | 83 | * FUNCTION: acpi_ut_validate_exception |
56 | * | 84 | * |
57 | * PARAMETERS: Status - The acpi_status code to be formatted | 85 | * PARAMETERS: Status - The acpi_status code to be formatted |
@@ -63,6 +91,7 @@ ACPI_MODULE_NAME("utmisc") | |||
63 | * an ASCII string. | 91 | * an ASCII string. |
64 | * | 92 | * |
65 | ******************************************************************************/ | 93 | ******************************************************************************/ |
94 | |||
66 | const char *acpi_ut_validate_exception(acpi_status status) | 95 | const char *acpi_ut_validate_exception(acpi_status status) |
67 | { | 96 | { |
68 | u32 sub_status; | 97 | u32 sub_status; |