diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2019-10-18 18:00:41 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2019-10-18 18:00:41 +0000 |
commit | 858f47305dae045d81f39451ade697ba99b3266f (patch) | |
tree | 67a913169f2c94028780a7a2a0c84fc9f84e8c60 /source/components/utilities | |
parent | e63852a7532181a14cec2928b31af2209e98414a (diff) |
Import ACPICA 20191018.vendor/acpica/20191018
Notes
Notes:
svn path=/vendor-sys/acpica/dist/; revision=353735
svn path=/vendor-sys/acpica/20191018/; revision=353736; tag=vendor/acpica/20191018
Diffstat (limited to 'source/components/utilities')
-rw-r--r-- | source/components/utilities/utbuffer.c | 62 | ||||
-rw-r--r-- | source/components/utilities/utids.c | 3 | ||||
-rw-r--r-- | source/components/utilities/uttrack.c | 2 |
3 files changed, 38 insertions, 29 deletions
diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c index 44fd30a6a16a..015c16f93939 100644 --- a/source/components/utilities/utbuffer.c +++ b/source/components/utilities/utbuffer.c @@ -186,8 +186,10 @@ AcpiUtDumpBuffer ( UINT32 j; UINT32 Temp32; UINT8 BufChar; + UINT32 DisplayDataOnly = Display & DB_DISPLAY_DATA_ONLY; + Display &= ~DB_DISPLAY_DATA_ONLY; if (!Buffer) { AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n"); @@ -205,7 +207,10 @@ AcpiUtDumpBuffer ( { /* Print current offset */ - AcpiOsPrintf ("%8.4X: ", (BaseOffset + i)); + if (!DisplayDataOnly) + { + AcpiOsPrintf ("%8.4X: ", (BaseOffset + i)); + } /* Print 16 hex chars */ @@ -257,38 +262,41 @@ AcpiUtDumpBuffer ( * Print the ASCII equivalent characters but watch out for the bad * unprintable ones (printable chars are 0x20 through 0x7E) */ - AcpiOsPrintf (" "); - for (j = 0; j < 16; j++) + if (!DisplayDataOnly) { - if (i + j >= Count) + AcpiOsPrintf (" "); + for (j = 0; j < 16; j++) { - AcpiOsPrintf ("\n"); - return; + if (i + j >= Count) + { + AcpiOsPrintf ("\n"); + return; + } + + /* + * Add comment characters so rest of line is ignored when + * compiled + */ + if (j == 0) + { + AcpiOsPrintf ("// "); + } + + BufChar = Buffer[(ACPI_SIZE) i + j]; + if (isprint (BufChar)) + { + AcpiOsPrintf ("%c", BufChar); + } + else + { + AcpiOsPrintf ("."); + } } - /* - * Add comment characters so rest of line is ignored when - * compiled - */ - if (j == 0) - { - AcpiOsPrintf ("// "); - } + /* Done with that line. */ - BufChar = Buffer[(ACPI_SIZE) i + j]; - if (isprint (BufChar)) - { - AcpiOsPrintf ("%c", BufChar); - } - else - { - AcpiOsPrintf ("."); - } + AcpiOsPrintf ("\n"); } - - /* Done with that line. */ - - AcpiOsPrintf ("\n"); i += 16; } diff --git a/source/components/utilities/utids.c b/source/components/utilities/utids.c index 5fcfbf66809e..513548c24a9e 100644 --- a/source/components/utilities/utids.c +++ b/source/components/utilities/utids.c @@ -466,7 +466,8 @@ AcpiUtExecute_CID ( { /* Copy the String CID from the returned object */ - strcpy (NextIdString, CidObjects[i]->String.Pointer); + AcpiUtSafeStrcpy (NextIdString, CidObjects[i]->String.Length + 1, + CidObjects[i]->String.Pointer); Length = CidObjects[i]->String.Length + 1; } diff --git a/source/components/utilities/uttrack.c b/source/components/utilities/uttrack.c index c6e6b45bd6de..76e439fee354 100644 --- a/source/components/utilities/uttrack.c +++ b/source/components/utilities/uttrack.c @@ -864,7 +864,7 @@ AcpiUtDumpAllocations ( case ACPI_DESC_TYPE_PARSER: - AcpiOsPrintf ("AmlOpcode 0x%04hX\n", + AcpiOsPrintf ("AmlOpcode 0x%04X\n", Descriptor->Op.Asl.AmlOpcode); break; |