]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ACPICA: iASL: Improved pathname support
authorBob Moore <robert.moore@intel.com>
Tue, 22 May 2012 08:26:53 +0000 (16:26 +0800)
committerLen Brown <len.brown@intel.com>
Fri, 1 Jun 2012 15:51:52 +0000 (11:51 -0400)
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>
drivers/acpi/acpica/acutils.h
drivers/acpi/acpica/utmisc.c

index 925ccf22101b45adcb66817c736195adbcbf975f..5035327ebccc38b26b96789bd96c808422c13723 100644 (file)
@@ -460,6 +460,8 @@ acpi_ut_short_divide(u64 in_dividend,
 /*
  * utmisc
  */
+void ut_convert_backslashes(char *pathname);
+
 const char *acpi_ut_validate_exception(acpi_status status);
 
 u8 acpi_ut_is_pci_root_bridge(char *id);
index 86f19db74e0549949c9685e391166b282523b949..e86f897767e8838cb9f10cfc060f218ce6786217 100644 (file)
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utmisc")
 
+/*******************************************************************************
+ *
+ * FUNCTION:    ut_convert_backslashes
+ *
+ * PARAMETERS:  Pathname        - File pathname string to be converted
+ *
+ * RETURN:      Modifies the input Pathname
+ *
+ * DESCRIPTION: Convert all backslashes (0x5C) to forward slashes (0x2F) within
+ *              the entire input file pathname string.
+ *
+ ******************************************************************************/
+void ut_convert_backslashes(char *pathname)
+{
+
+       if (!pathname) {
+               return;
+       }
+
+       while (*pathname) {
+               if (*pathname == '\\') {
+                       *pathname = '/';
+               }
+
+               pathname++;
+       }
+}
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ut_validate_exception
@@ -63,6 +91,7 @@ ACPI_MODULE_NAME("utmisc")
  *              an ASCII string.
  *
  ******************************************************************************/
+
 const char *acpi_ut_validate_exception(acpi_status status)
 {
        u32 sub_status;