summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
diff options
context:
space:
mode:
authorHuajing Li <huajing.li@intel.com>2017-07-27 12:33:43 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2017-07-27 18:07:55 +0800
commit1557f05b37f89d1f3cd41a5543a22533fc68ede6 (patch)
treecf79c3f893bf9d2a6784506e66097a0742314d10 /ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
parent2c2c68b9d3e83af26042f03f9864fd38ce922a89 (diff)
downloadedk2-1557f05b37f89d1f3cd41a5543a22533fc68ede6.tar.gz
edk2-1557f05b37f89d1f3cd41a5543a22533fc68ede6.tar.bz2
edk2-1557f05b37f89d1f3cd41a5543a22533fc68ede6.zip
ShellPkg/setvar: Check the duplicate flag
Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
index 8fb918d082..b7d3bbdc03 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
@@ -384,6 +384,10 @@ ShellCommandRunSetVar (
} else {
ASSERT(FALSE);
}
+ } else if (ShellCommandLineCheckDuplicate (Package,&ProblemParam) != EFI_SUCCESS) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_DUPLICATE), gShellDebug1HiiHandle, L"setvar", ProblemParam);
+ FreePool(ProblemParam);
+ ShellStatus = SHELL_INVALID_PARAMETER;
} else {
if (ShellCommandLineGetCount(Package) < 2) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"setvar");