]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel2CommandsLib/Reset.c
1.Add code to check the pointer 'CorrectedPath' in Ls.c line 460 before referenced...
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel2CommandsLib / Reset.c
index d0eea8d0337d430b69c6787a6bd0cc14072162c2..ff9c9d69171169a213019496996e3c0316e62a87 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for attrib shell level 2 function.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, 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
@@ -72,22 +72,22 @@ ShellCommandRunReset (
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
       //\r
-      // check for cold reset flag, then shutdown reset flag, then warm (default) reset flag\r
+      // check for warm reset flag, then shutdown reset flag, then cold (default) reset flag\r
       //\r
-      if (ShellCommandLineGetFlag(Package, L"-c")) {\r
-        if (ShellCommandLineGetFlag(Package, L"-s") || ShellCommandLineGetFlag(Package, L"-w")) {\r
+      if (ShellCommandLineGetFlag(Package, L"-w")) {\r
+        if (ShellCommandLineGetFlag(Package, L"-s") || ShellCommandLineGetFlag(Package, L"-c")) {\r
           ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle);\r
           ShellStatus = SHELL_INVALID_PARAMETER;\r
         } else {\r
-          String = ShellCommandLineGetValue(Package, L"-c");\r
+          String = ShellCommandLineGetValue(Package, L"-w");\r
           if (String != NULL) {\r
-            gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, StrSize(String), (VOID*)String);\r
+            gRT->ResetSystem(EfiResetWarm, EFI_SUCCESS, StrSize(String), (VOID*)String);\r
           } else {\r
-            gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);\r
+            gRT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);\r
           }\r
         }\r
       } else if (ShellCommandLineGetFlag(Package, L"-s")) {\r
-        if (ShellCommandLineGetFlag(Package, L"-w")) {\r
+        if (ShellCommandLineGetFlag(Package, L"-c")) {\r
           ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle);\r
           ShellStatus = SHELL_INVALID_PARAMETER;\r
         } else {\r
@@ -103,11 +103,11 @@ ShellCommandRunReset (
         //\r
         // this is default so dont worry about flag...\r
         //\r
-        String = ShellCommandLineGetValue(Package, L"-w");\r
+        String = ShellCommandLineGetValue(Package, L"-c");\r
         if (String != NULL) {\r
-          gRT->ResetSystem(EfiResetWarm, EFI_SUCCESS, StrSize(String), (VOID*)String);\r
+          gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, StrSize(String), (VOID*)String);\r
         } else {\r
-          gRT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);\r
+          gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);\r
         }\r
       }\r
     }\r