]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg/comp: return NOT_EQUAL when compared files are different
authorRuiyu Ni <ruiyu.ni@intel.com>
Thu, 14 Jun 2018 05:55:21 +0000 (13:55 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Thu, 21 Jun 2018 07:24:56 +0000 (15:24 +0800)
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>
ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c

index f45f663dbbbf20399274f47f62a67907796b4b91..7c232d01c7487be30dab4bbfd53a16f7b0c6cbb3 100644 (file)
@@ -2,7 +2,7 @@
   Main file for Comp shell Debug1 function.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
   Main file for Comp shell Debug1 function.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -356,6 +356,7 @@ ShellCommandRunComp (
         if (DiffPointNumber == 0) {\r
           ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_COMP_FOOTER_PASS), gShellDebug1HiiHandle);\r
         } else {\r
         if (DiffPointNumber == 0) {\r
           ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_COMP_FOOTER_PASS), gShellDebug1HiiHandle);\r
         } else {\r
+          ShellStatus = SHELL_NOT_EQUAL;\r
           ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_COMP_FOOTER_FAIL), gShellDebug1HiiHandle);\r
         }\r
       }\r
           ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_COMP_FOOTER_FAIL), gShellDebug1HiiHandle);\r
         }\r
       }\r