mirror of https://github.com/acidanthera/audk.git
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:
parent
44a957c607
commit
3372840669
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue