ShellPkg: swap warm and cold to get the default correct for Reset command.

sighed-off-by: jcarsey
reviewed-by: gookboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12623 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jcarsey 2011-11-01 20:05:11 +00:00
parent 44a957c607
commit 3372840669
1 changed files with 6 additions and 6 deletions

View File

@ -72,14 +72,14 @@ ShellCommandRunReset (
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
//
// check for cold reset flag, then shutdown reset flag, then warm (default) reset flag
// check for warm reset flag, then shutdown reset flag, then cold (default) reset flag
//
if (ShellCommandLineGetFlag(Package, L"-c")) {
if (ShellCommandLineGetFlag(Package, L"-s") || ShellCommandLineGetFlag(Package, L"-w")) {
if (ShellCommandLineGetFlag(Package, L"-w")) {
if (ShellCommandLineGetFlag(Package, L"-s") || ShellCommandLineGetFlag(Package, L"-c")) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle);
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
String = ShellCommandLineGetValue(Package, L"-c");
String = ShellCommandLineGetValue(Package, L"-w");
if (String != NULL) {
gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, StrSize(String), (VOID*)String);
} else {
@ -87,7 +87,7 @@ ShellCommandRunReset (
}
}
} else if (ShellCommandLineGetFlag(Package, L"-s")) {
if (ShellCommandLineGetFlag(Package, L"-w")) {
if (ShellCommandLineGetFlag(Package, L"-c")) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle);
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
@ -103,7 +103,7 @@ ShellCommandRunReset (
//
// this is default so dont worry about flag...
//
String = ShellCommandLineGetValue(Package, L"-w");
String = ShellCommandLineGetValue(Package, L"-c");
if (String != NULL) {
gRT->ResetSystem(EfiResetWarm, EFI_SUCCESS, StrSize(String), (VOID*)String);
} else {