diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2017-05-31 22:40:24 +0000 | 
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2017-05-31 22:40:24 +0000 | 
| commit | c457a42be4fca72c51fdca569271b62213d01a37 (patch) | |
| tree | 0ce624183fb74a6ec5d2260e6904585800e8c4d8 /source/components/namespace/nsaccess.c | |
| parent | 65c600c804e5a81af3a34d461312027000738994 (diff) | |
Notes
Diffstat (limited to 'source/components/namespace/nsaccess.c')
| -rw-r--r-- | source/components/namespace/nsaccess.c | 27 | 
1 files changed, 27 insertions, 0 deletions
diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c index 401015753219..1404eabf67ad 100644 --- a/source/components/namespace/nsaccess.c +++ b/source/components/namespace/nsaccess.c @@ -155,6 +155,9 @@  #include "acnamesp.h"  #include "acdispat.h" +#ifdef ACPI_ASL_COMPILER +    #include "acdisasm.h" +#endif  #define _COMPONENT          ACPI_NAMESPACE          ACPI_MODULE_NAME    ("nsaccess") @@ -710,6 +713,30 @@ AcpiNsLookup (                      CurrentNode));              } +#ifdef ACPI_ASL_COMPILER +            /* +             * If this ACPI name already exists within the namespace as an +             * external declaration, then mark the external as a conflicting +             * declaration and proceed to process the current node as if it did +             * not exist in the namespace. If this node is not processed as +             * normal, then it could cause improper namespace resolution +             * by failing to open a new scope. +             */ +            if (AcpiGbl_DisasmFlag && +                (Status == AE_ALREADY_EXISTS) && +                ((ThisNode->Flags & ANOBJ_IS_EXTERNAL) || +                    (WalkState && WalkState->Opcode == AML_EXTERNAL_OP))) +            { +                ThisNode->Flags &= ~ANOBJ_IS_EXTERNAL; +                ThisNode->Type = (UINT8)ThisSearchType; +                if (WalkState->Opcode != AML_EXTERNAL_OP) +                { +                    AcpiDmMarkExternalConflict (ThisNode); +                } +                break; +            } +#endif +              *ReturnNode = ThisNode;              return_ACPI_STATUS (Status);          }  | 
