diff options
Diffstat (limited to 'drivers/acpi/acpica/utbuffer.c')
-rw-r--r-- | drivers/acpi/acpica/utbuffer.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/acpi/acpica/utbuffer.c b/drivers/acpi/acpica/utbuffer.c index bd31faf5da7c..ff2981275b9a 100644 --- a/drivers/acpi/acpica/utbuffer.c +++ b/drivers/acpi/acpica/utbuffer.c | |||
@@ -239,8 +239,7 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file, | |||
239 | u8 buf_char; | 239 | u8 buf_char; |
240 | 240 | ||
241 | if (!buffer) { | 241 | if (!buffer) { |
242 | acpi_ut_file_printf(file, | 242 | fprintf(file, "Null Buffer Pointer in DumpBuffer!\n"); |
243 | "Null Buffer Pointer in DumpBuffer!\n"); | ||
244 | return; | 243 | return; |
245 | } | 244 | } |
246 | 245 | ||
@@ -254,7 +253,7 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file, | |||
254 | 253 | ||
255 | /* Print current offset */ | 254 | /* Print current offset */ |
256 | 255 | ||
257 | acpi_ut_file_printf(file, "%6.4X: ", (base_offset + i)); | 256 | fprintf(file, "%6.4X: ", (base_offset + i)); |
258 | 257 | ||
259 | /* Print 16 hex chars */ | 258 | /* Print 16 hex chars */ |
260 | 259 | ||
@@ -263,8 +262,7 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file, | |||
263 | 262 | ||
264 | /* Dump fill spaces */ | 263 | /* Dump fill spaces */ |
265 | 264 | ||
266 | acpi_ut_file_printf(file, "%*s", | 265 | fprintf(file, "%*s", ((display * 2) + 1), " "); |
267 | ((display * 2) + 1), " "); | ||
268 | j += display; | 266 | j += display; |
269 | continue; | 267 | continue; |
270 | } | 268 | } |
@@ -273,34 +271,34 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file, | |||
273 | case DB_BYTE_DISPLAY: | 271 | case DB_BYTE_DISPLAY: |
274 | default: /* Default is BYTE display */ | 272 | default: /* Default is BYTE display */ |
275 | 273 | ||
276 | acpi_ut_file_printf(file, "%02X ", | 274 | fprintf(file, "%02X ", |
277 | buffer[(acpi_size)i + j]); | 275 | buffer[(acpi_size)i + j]); |
278 | break; | 276 | break; |
279 | 277 | ||
280 | case DB_WORD_DISPLAY: | 278 | case DB_WORD_DISPLAY: |
281 | 279 | ||
282 | ACPI_MOVE_16_TO_32(&temp32, | 280 | ACPI_MOVE_16_TO_32(&temp32, |
283 | &buffer[(acpi_size)i + j]); | 281 | &buffer[(acpi_size)i + j]); |
284 | acpi_ut_file_printf(file, "%04X ", temp32); | 282 | fprintf(file, "%04X ", temp32); |
285 | break; | 283 | break; |
286 | 284 | ||
287 | case DB_DWORD_DISPLAY: | 285 | case DB_DWORD_DISPLAY: |
288 | 286 | ||
289 | ACPI_MOVE_32_TO_32(&temp32, | 287 | ACPI_MOVE_32_TO_32(&temp32, |
290 | &buffer[(acpi_size)i + j]); | 288 | &buffer[(acpi_size)i + j]); |
291 | acpi_ut_file_printf(file, "%08X ", temp32); | 289 | fprintf(file, "%08X ", temp32); |
292 | break; | 290 | break; |
293 | 291 | ||
294 | case DB_QWORD_DISPLAY: | 292 | case DB_QWORD_DISPLAY: |
295 | 293 | ||
296 | ACPI_MOVE_32_TO_32(&temp32, | 294 | ACPI_MOVE_32_TO_32(&temp32, |
297 | &buffer[(acpi_size)i + j]); | 295 | &buffer[(acpi_size)i + j]); |
298 | acpi_ut_file_printf(file, "%08X", temp32); | 296 | fprintf(file, "%08X", temp32); |
299 | 297 | ||
300 | ACPI_MOVE_32_TO_32(&temp32, | 298 | ACPI_MOVE_32_TO_32(&temp32, |
301 | &buffer[(acpi_size)i + j + | 299 | &buffer[(acpi_size)i + j + |
302 | 4]); | 300 | 4]); |
303 | acpi_ut_file_printf(file, "%08X ", temp32); | 301 | fprintf(file, "%08X ", temp32); |
304 | break; | 302 | break; |
305 | } | 303 | } |
306 | 304 | ||
@@ -311,24 +309,24 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file, | |||
311 | * Print the ASCII equivalent characters but watch out for the bad | 309 | * Print the ASCII equivalent characters but watch out for the bad |
312 | * unprintable ones (printable chars are 0x20 through 0x7E) | 310 | * unprintable ones (printable chars are 0x20 through 0x7E) |
313 | */ | 311 | */ |
314 | acpi_ut_file_printf(file, " "); | 312 | fprintf(file, " "); |
315 | for (j = 0; j < 16; j++) { | 313 | for (j = 0; j < 16; j++) { |
316 | if (i + j >= count) { | 314 | if (i + j >= count) { |
317 | acpi_ut_file_printf(file, "\n"); | 315 | fprintf(file, "\n"); |
318 | return; | 316 | return; |
319 | } | 317 | } |
320 | 318 | ||
321 | buf_char = buffer[(acpi_size)i + j]; | 319 | buf_char = buffer[(acpi_size)i + j]; |
322 | if (isprint(buf_char)) { | 320 | if (isprint(buf_char)) { |
323 | acpi_ut_file_printf(file, "%c", buf_char); | 321 | fprintf(file, "%c", buf_char); |
324 | } else { | 322 | } else { |
325 | acpi_ut_file_printf(file, "."); | 323 | fprintf(file, "."); |
326 | } | 324 | } |
327 | } | 325 | } |
328 | 326 | ||
329 | /* Done with that line. */ | 327 | /* Done with that line. */ |
330 | 328 | ||
331 | acpi_ut_file_printf(file, "\n"); | 329 | fprintf(file, "\n"); |
332 | i += 16; | 330 | i += 16; |
333 | } | 331 | } |
334 | 332 | ||