diff options
Diffstat (limited to 'source/tools/acpixtract/axutils.c')
-rw-r--r-- | source/tools/acpixtract/axutils.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/source/tools/acpixtract/axutils.c b/source/tools/acpixtract/axutils.c index 6f887668426ef..e358341630f52 100644 --- a/source/tools/acpixtract/axutils.c +++ b/source/tools/acpixtract/axutils.c @@ -201,6 +201,7 @@ AxIsFileAscii ( FILE *Handle) { UINT8 Byte; + UINT32 Offset = 0; /* Read the entire file */ @@ -223,15 +224,27 @@ AxIsFileAscii ( if (!ACPI_IS_ASCII (Byte)) { - goto ErrorExit; + printf ("Found non-ascii char: %2.2X at file offset %u (0x%X)\n", + Byte, Offset, Offset); + if (!Gbl_ForceExtraction) + { + goto ErrorExit; + } } /* Ensure character is either printable or a "space" char */ else if (!isprint (Byte) && !isspace (Byte)) { - goto ErrorExit; + printf ("Found non-printable char: %2.2X at file offset %u (0x%X)\n", + Byte, Offset, Offset); + if (!Gbl_ForceExtraction) + { + goto ErrorExit; + } } + + Offset++; } /* File is OK (100% ASCII) */ |