* [PATCH] ShellPkg/comp: return NOT_EQUAL when compared files are different
@ 2018-06-14 5:55 Ruiyu Ni
2018-06-20 15:31 ` Carsey, Jaben
0 siblings, 1 reply; 2+ messages in thread
From: Ruiyu Ni @ 2018-06-14 5:55 UTC (permalink / raw)
To: edk2-devel; +Cc: Jaben Carsey
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>
Cc: Jaben Carsey <jaben.carsey@intel.com>
---
ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
index f45f663dbb..7c232d01c7 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);
}
}
--
2.16.1.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ShellPkg/comp: return NOT_EQUAL when compared files are different
2018-06-14 5:55 [PATCH] ShellPkg/comp: return NOT_EQUAL when compared files are different Ruiyu Ni
@ 2018-06-20 15:31 ` Carsey, Jaben
0 siblings, 0 replies; 2+ messages in thread
From: Carsey, Jaben @ 2018-06-20 15:31 UTC (permalink / raw)
To: Ni, Ruiyu, edk2-devel@lists.01.org
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Ruiyu Ni
> Sent: Wednesday, June 13, 2018 10:55 PM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben <jaben.carsey@intel.com>
> Subject: [edk2] [PATCH] ShellPkg/comp: return NOT_EQUAL when compared
> files are different
> Importance: High
>
> 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>
> Cc: Jaben Carsey <jaben.carsey@intel.com>
> ---
> ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
> index f45f663dbb..7c232d01c7 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);
> }
> }
> --
> 2.16.1.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-20 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-14 5:55 [PATCH] ShellPkg/comp: return NOT_EQUAL when compared files are different Ruiyu Ni
2018-06-20 15:31 ` Carsey, Jaben
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox