]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel2CommandsLib/Set.c
ShellBinPkg: Clean up source files
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel2CommandsLib / Set.c
index 45948e12753111dff3c6fe61512909feb0e8330c..7ca19427d5ef5963bf8b3541e3c51e2f1dc37780 100644 (file)
@@ -2,7 +2,7 @@
   Main file for attrib shell level 2 function.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2015, 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
@@ -24,7 +24,6 @@
   @return any return code from GetNextVariableName except EFI_NOT_FOUND\r
 **/\r
 SHELL_STATUS\r
-EFIAPI\r
 PrintAllShellEnvVars(\r
   VOID\r
   )\r
@@ -141,6 +140,11 @@ ShellCommandRunSet (
         // assigning one\r
         //\r
         Status = ShellSetEnvironmentVariable(KeyName, Value, ShellCommandLineGetFlag(Package, L"-v"));\r
+        if (EFI_ERROR(Status)) {\r
+          ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_ERROR_SET), gShellLevel2HiiHandle, L"set", KeyName);\r
+          ShellStatus = (SHELL_STATUS) (Status & (~MAX_BIT));\r
+        }\r
+        \r
       } else {\r
         if (KeyName != NULL) {\r
           //\r