summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2018-06-14 13:55:21 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2018-06-21 15:24:56 +0800
commitc2d6e2bc12b2a4e99304a1ebbc3474638721f5a8 (patch)
treef2b4842464e2cbcf1b43458b87ae19c79e19f1ba
parent2e1083038d9aa74fcaa2db8158fdee7c8b4af3bb (diff)
downloadedk2-c2d6e2bc12b2a4e99304a1ebbc3474638721f5a8.zip
edk2-c2d6e2bc12b2a4e99304a1ebbc3474638721f5a8.tar.gz
edk2-c2d6e2bc12b2a4e99304a1ebbc3474638721f5a8.tar.bz2
ShellPkg/comp: return NOT_EQUAL when compared files are different
Today's implementation returns 0 even when compared files are different. The patch returns 27 (SHELL_NOT_QUAL) in such case to follow the shell spec. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
index f45f663..7c232d0 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
@@ -2,7 +2,7 @@
Main file for Comp shell Debug1 function.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -356,6 +356,7 @@ ShellCommandRunComp (
if (DiffPointNumber == 0) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_COMP_FOOTER_PASS), gShellDebug1HiiHandle);
} else {
+ ShellStatus = SHELL_NOT_EQUAL;
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_COMP_FOOTER_FAIL), gShellDebug1HiiHandle);
}
}