diff options
author | Robert Moore <Robert.Moore@intel.com> | 2016-09-29 14:10:05 -0700 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2016-09-29 14:10:05 -0700 |
commit | 483b0adb7135ff5050c8bc4066c7b01730b1fcd8 (patch) | |
tree | e74e71b7087c0d7810d192d756b00c25788a8569 | |
parent | 4b367408659af08fd44839866ec301285284e6f4 (diff) | |
download | acpica-483b0adb7135ff5050c8bc4066c7b01730b1fcd8.tar.gz |
acpibin: exit with non-zero status on miscompare
For the compare option, return -1 if any bytes miscompare.
-rw-r--r-- | source/tools/acpibin/abcompare.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/tools/acpibin/abcompare.c b/source/tools/acpibin/abcompare.c index 955fb4af0..2100d14b4 100644 --- a/source/tools/acpibin/abcompare.c +++ b/source/tools/acpibin/abcompare.c @@ -505,7 +505,7 @@ AbCompareAmlFiles ( { if (Char1 != Char2) { - printf ("Error - Byte mismatch at offset %8.8X: 0x%2.2X 0x%2.2X\n", + printf ("Error - Byte mismatch at offset %8.4X: 0x%2.2X 0x%2.2X\n", Offset, Char1, Char2); Mismatches++; if (Mismatches > 100) @@ -543,7 +543,10 @@ AbCompareAmlFiles ( } printf ("%u Mismatches found\n", Mismatches); - Status = 0; + if (Mismatches == 0) + { + Status = 0; + } Exit2: fclose (File2); |