]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ACPICA: Allow multiple backslash prefix in namepaths
authorLin Ming <ming.m.lin@intel.com>
Thu, 13 Nov 2008 02:54:39 +0000 (10:54 +0800)
committerLen Brown <len.brown@intel.com>
Tue, 30 Dec 2008 03:38:38 +0000 (22:38 -0500)
In a fully qualified namepath, allow multiple backslash prefixes.
This can happen because of the use of a double-backslash in strings
(since backslash is the escape character) causing confusion.
ACPICA BZ 739 Lin Ming.

http://www.acpica.org/bugzilla/show_bug.cgi?id=739

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/namespace/nsutils.c

index b0817e1127b105c15108ae5055240008b3a0ec6d..337fb04e0388692eb895548320809e18cf82ceb0 100644 (file)
@@ -314,9 +314,15 @@ void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info)
         *
         * strlen() + 1 covers the first name_seg, which has no path separator
         */
-       if (acpi_ns_valid_root_prefix(next_external_char[0])) {
+       if (acpi_ns_valid_root_prefix(*next_external_char)) {
                info->fully_qualified = TRUE;
                next_external_char++;
+
+               /* Skip redundant root_prefix, like \\_SB.PCI0.SBRG.EC0 */
+
+               while (acpi_ns_valid_root_prefix(*next_external_char)) {
+                       next_external_char++;
+               }
        } else {
                /*
                 * Handle Carat prefixes