/** @file\r
Main file for attrib shell level 2 function.\r
\r
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<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
Status = ShellCommandLineParse (ResetParamList, &Package, &ProblemParam, TRUE);\r
if (EFI_ERROR(Status)) {\r
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, ProblemParam);\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"reset", ProblemParam); \r
FreePool(ProblemParam);\r
return (SHELL_INVALID_PARAMETER);\r
} else {\r
if (ShellCommandLineGetFlag(Package, L"-?")) {\r
ASSERT(FALSE);\r
} else if (ShellCommandLineGetRawValue(Package, 1) != NULL) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle);\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"reset"); \r
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
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle);\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, L"reset"); \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
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle);\r
+ if (ShellCommandLineGetFlag(Package, L"-c")) {\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"reset"); \r
ShellStatus = SHELL_INVALID_PARAMETER;\r
} else {\r
String = ShellCommandLineGetValue(Package, L"-s");\r
//\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