.. | .. |
---|
3 | 3 | * |
---|
4 | 4 | * Module Name: utbuffer - Buffer dump routines |
---|
5 | 5 | * |
---|
6 | | - * Copyright (C) 2000 - 2018, Intel Corp. |
---|
| 6 | + * Copyright (C) 2000 - 2020, Intel Corp. |
---|
7 | 7 | * |
---|
8 | 8 | *****************************************************************************/ |
---|
9 | 9 | |
---|
.. | .. |
---|
37 | 37 | u32 j; |
---|
38 | 38 | u32 temp32; |
---|
39 | 39 | u8 buf_char; |
---|
| 40 | + u32 display_data_only = display & DB_DISPLAY_DATA_ONLY; |
---|
40 | 41 | |
---|
| 42 | + display &= ~DB_DISPLAY_DATA_ONLY; |
---|
41 | 43 | if (!buffer) { |
---|
42 | 44 | acpi_os_printf("Null Buffer Pointer in DumpBuffer!\n"); |
---|
43 | 45 | return; |
---|
.. | .. |
---|
53 | 55 | |
---|
54 | 56 | /* Print current offset */ |
---|
55 | 57 | |
---|
56 | | - acpi_os_printf("%8.4X: ", (base_offset + i)); |
---|
| 58 | + if (!display_data_only) { |
---|
| 59 | + acpi_os_printf("%8.4X: ", (base_offset + i)); |
---|
| 60 | + } |
---|
57 | 61 | |
---|
58 | 62 | /* Print 16 hex chars */ |
---|
59 | 63 | |
---|
.. | .. |
---|
109 | 113 | * Print the ASCII equivalent characters but watch out for the bad |
---|
110 | 114 | * unprintable ones (printable chars are 0x20 through 0x7E) |
---|
111 | 115 | */ |
---|
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 | + } |
---|
117 | 138 | } |
---|
118 | 139 | |
---|
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. */ |
---|
126 | 141 | |
---|
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"); |
---|
133 | 143 | } |
---|
134 | | - |
---|
135 | | - /* Done with that line. */ |
---|
136 | | - |
---|
137 | | - acpi_os_printf("\n"); |
---|
138 | 144 | i += 16; |
---|
139 | 145 | } |
---|
140 | 146 | |
---|