hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/acpi/acpica/utbuffer.c
....@@ -3,7 +3,7 @@
33 *
44 * Module Name: utbuffer - Buffer dump routines
55 *
6
- * Copyright (C) 2000 - 2018, Intel Corp.
6
+ * Copyright (C) 2000 - 2020, Intel Corp.
77 *
88 *****************************************************************************/
99
....@@ -37,7 +37,9 @@
3737 u32 j;
3838 u32 temp32;
3939 u8 buf_char;
40
+ u32 display_data_only = display & DB_DISPLAY_DATA_ONLY;
4041
42
+ display &= ~DB_DISPLAY_DATA_ONLY;
4143 if (!buffer) {
4244 acpi_os_printf("Null Buffer Pointer in DumpBuffer!\n");
4345 return;
....@@ -53,7 +55,9 @@
5355
5456 /* Print current offset */
5557
56
- acpi_os_printf("%8.4X: ", (base_offset + i));
58
+ if (!display_data_only) {
59
+ acpi_os_printf("%8.4X: ", (base_offset + i));
60
+ }
5761
5862 /* Print 16 hex chars */
5963
....@@ -109,32 +113,34 @@
109113 * Print the ASCII equivalent characters but watch out for the bad
110114 * unprintable ones (printable chars are 0x20 through 0x7E)
111115 */
112
- acpi_os_printf(" ");
113
- for (j = 0; j < 16; j++) {
114
- if (i + j >= count) {
115
- acpi_os_printf("\n");
116
- return;
116
+ if (!display_data_only) {
117
+ acpi_os_printf(" ");
118
+ for (j = 0; j < 16; j++) {
119
+ if (i + j >= count) {
120
+ acpi_os_printf("\n");
121
+ return;
122
+ }
123
+
124
+ /*
125
+ * Add comment characters so rest of line is ignored when
126
+ * compiled
127
+ */
128
+ if (j == 0) {
129
+ acpi_os_printf("// ");
130
+ }
131
+
132
+ buf_char = buffer[(acpi_size)i + j];
133
+ if (isprint(buf_char)) {
134
+ acpi_os_printf("%c", buf_char);
135
+ } else {
136
+ acpi_os_printf(".");
137
+ }
117138 }
118139
119
- /*
120
- * Add comment characters so rest of line is ignored when
121
- * compiled
122
- */
123
- if (j == 0) {
124
- acpi_os_printf("// ");
125
- }
140
+ /* Done with that line. */
126141
127
- buf_char = buffer[(acpi_size)i + j];
128
- if (isprint(buf_char)) {
129
- acpi_os_printf("%c", buf_char);
130
- } else {
131
- acpi_os_printf(".");
132
- }
142
+ acpi_os_printf("\n");
133143 }
134
-
135
- /* Done with that line. */
136
-
137
- acpi_os_printf("\n");
138144 i += 16;
139145 }
140146