diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2019-08-16 17:03:01 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2019-08-16 17:03:01 +0000 |
| commit | e63852a7532181a14cec2928b31af2209e98414a (patch) | |
| tree | be94508475add18bbaa0cacd6c467983d2b8a443 /source/tools | |
| parent | 0ada71f05e76bf61eb2d5aba852db00705edd364 (diff) | |
Notes
Diffstat (limited to 'source/tools')
| -rw-r--r-- | source/tools/acpidump/apfiles.c | 11 | ||||
| -rw-r--r-- | source/tools/acpiexec/aeexec.c | 2 | ||||
| -rw-r--r-- | source/tools/examples/examples.c | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/source/tools/acpidump/apfiles.c b/source/tools/acpidump/apfiles.c index 784a9315ead3..e61bb4ecbe3b 100644 --- a/source/tools/acpidump/apfiles.c +++ b/source/tools/acpidump/apfiles.c @@ -177,20 +177,27 @@ ApIsExistingFile ( { #if !defined(_GNU_EFI) && !defined(_EDK2_EFI) struct stat StatInfo; + int InChar; if (!stat (Pathname, &StatInfo)) { fprintf (stderr, "Target path already exists, overwrite? [y|n] "); - if (getchar () != 'y') + InChar = fgetc (stdin); + if (InChar == '\n') + { + InChar = fgetc (stdin); + } + + if (InChar != 'y' && InChar != 'Y') { return (-1); } } #endif - return 0; + return (0); } diff --git a/source/tools/acpiexec/aeexec.c b/source/tools/acpiexec/aeexec.c index 942fadd35c10..ecedabf065a4 100644 --- a/source/tools/acpiexec/aeexec.c +++ b/source/tools/acpiexec/aeexec.c @@ -452,7 +452,7 @@ ExecuteOSI ( { AcpiOsPrintf ( "Return value from _OSI method too small, %.8X\n", - ReturnValue.Length); + (UINT32) ReturnValue.Length); goto ErrorExit; } diff --git a/source/tools/examples/examples.c b/source/tools/examples/examples.c index 73cdd535698b..f5ff6bddb787 100644 --- a/source/tools/examples/examples.c +++ b/source/tools/examples/examples.c @@ -576,7 +576,7 @@ ExecuteOSI ( if (ReturnValue.Length < sizeof (ACPI_OBJECT)) { AcpiOsPrintf ("Return value from _OSI method too small, %.8X\n", - ReturnValue.Length); + (UINT32) ReturnValue.Length); goto ErrorExit; } |
