diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2020-11-13 21:41:15 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2020-11-13 21:41:15 +0000 |
commit | 960614968e0da10b32875a57ea1e30cc9c85b5e0 (patch) | |
tree | aaf48208a3fb6bc556d860f5100f5a26b92a4a96 /source/compiler/aslnamesp.c | |
parent | e09636e66f40fad3b03a8dd4b86b1a371c435631 (diff) |
Notes
Diffstat (limited to 'source/compiler/aslnamesp.c')
-rw-r--r-- | source/compiler/aslnamesp.c | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/source/compiler/aslnamesp.c b/source/compiler/aslnamesp.c index f74b5ffb45335..0a099a0b9b1e8 100644 --- a/source/compiler/aslnamesp.c +++ b/source/compiler/aslnamesp.c @@ -226,8 +226,8 @@ NsDisplayNamespace ( /* File header */ - FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "Contents of ACPI Namespace\n\n"); - FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "Count Depth Name - Type\n\n"); + FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "Contents of ACPI Namespace\n\n" + "Count Depth Name - Type\n\n"); /* Walk entire namespace from the root */ @@ -239,14 +239,21 @@ NsDisplayNamespace ( return (Status); } - /* Print the full pathname for each namespace node */ + /* Print the full pathname for each namespace node in the common namespace */ - FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "\nNamespace pathnames\n\n"); + FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, + "\nNamespace pathnames and where declared:\n" + "<NamePath, Object type, Containing file, Line number within file>\n\n"); Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, FALSE, NsDoOnePathname, NULL, NULL, NULL); + /* + * We just dumped the entire common namespace, we don't want to do it + * again for other input files. + */ + AslGbl_NsOutputFlag = FALSE; return (Status); } @@ -512,7 +519,7 @@ NsDoOneNamespaceObject ( * * RETURN: Status * - * DESCRIPTION: Print the full pathname for a namespace node. + * DESCRIPTION: Print the full pathname and addtional info for a namespace node. * ******************************************************************************/ @@ -528,6 +535,13 @@ NsDoOnePathname ( ACPI_BUFFER TargetPath; + /* Ignore predefined namespace nodes and External declarations */ + + if (!Node->Op || (Node->Flags & ANOBJ_IS_EXTERNAL)) + { + return (AE_OK); + } + TargetPath.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (Node, &TargetPath, FALSE); if (ACPI_FAILURE (Status)) @@ -535,8 +549,15 @@ NsDoOnePathname ( return (Status); } - FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%s\n", - ACPI_CAST_PTR (char, TargetPath.Pointer)); + /* + * Print the full pathname (and other information) + * for each namespace node in the common namespace + */ + FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%-41s %-12s %s, %u\n", + ACPI_CAST_PTR (char, TargetPath.Pointer), + AcpiUtGetTypeName (Node->Type), + Node->Op->Asl.Filename, Node->Op->Asl.LogicalLineNumber); + ACPI_FREE (TargetPath.Pointer); return (AE_OK); } |