diff options
-rw-r--r-- | ShellPkg/Application/Shell/Shell.c | 62 | ||||
-rw-r--r-- | ShellPkg/Application/Shell/Shell.inf | 2 | ||||
-rw-r--r-- | ShellPkg/Application/Shell/Shell.uni | bin | 4588 -> 4938 bytes | |||
-rw-r--r-- | ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf | 2 | ||||
-rw-r--r-- | ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.uni | bin | 42726 -> 42738 bytes | |||
-rw-r--r-- | ShellPkg/Library/UefiShellLevel3CommandsLib/Ver.c | 6 | ||||
-rw-r--r-- | ShellPkg/ShellPkg.dec | 8 |
7 files changed, 66 insertions, 14 deletions
diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index 3019c7d410..e5a648833d 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -297,11 +297,28 @@ UefiMain ( 0,
gST->ConOut->Mode->CursorRow,
NULL,
- STRING_TOKEN (STR_VER_OUTPUT_MAIN),
+ STRING_TOKEN (STR_VER_OUTPUT_MAIN_SHELL),
ShellInfoObject.HiiHandle,
SupportLevel[PcdGet8(PcdShellSupportLevel)],
gEfiShellProtocol->MajorVersion,
- gEfiShellProtocol->MinorVersion,
+ gEfiShellProtocol->MinorVersion
+ );
+
+ ShellPrintHiiEx (
+ -1,
+ -1,
+ NULL,
+ STRING_TOKEN (STR_VER_OUTPUT_MAIN_SUPPLIER),
+ ShellInfoObject.HiiHandle,
+ (CHAR16 *) PcdGetPtr (PcdShellSupplier)
+ );
+
+ ShellPrintHiiEx (
+ -1,
+ -1,
+ NULL,
+ STRING_TOKEN (STR_VER_OUTPUT_MAIN_UEFI),
+ ShellInfoObject.HiiHandle,
(gST->Hdr.Revision&0xffff0000)>>16,
(gST->Hdr.Revision&0x0000ffff),
gST->FirmwareVendor,
@@ -840,12 +857,12 @@ DoStartupScript( //
// print out our warning and see if they press a key
//
- for ( Status = EFI_UNSUPPORTED, Delay = ShellInfoObject.ShellInitSettings.Delay * 10
+ for ( Status = EFI_UNSUPPORTED, Delay = ShellInfoObject.ShellInitSettings.Delay
; Delay != 0 && EFI_ERROR(Status)
; Delay--
){
- ShellPrintHiiEx(0, gST->ConOut->Mode->CursorRow, NULL, STRING_TOKEN (STR_SHELL_STARTUP_QUESTION), ShellInfoObject.HiiHandle, Delay/10);
- gBS->Stall (100000);
+ ShellPrintHiiEx(0, gST->ConOut->Mode->CursorRow, NULL, STRING_TOKEN (STR_SHELL_STARTUP_QUESTION), ShellInfoObject.HiiHandle, Delay);
+ gBS->Stall (1000000);
if (!ShellInfoObject.ShellInitSettings.BitUnion.Bits.NoConsoleIn) {
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
}
@@ -1396,13 +1413,32 @@ RunCommand( if (CleanOriginal == NULL) {
return (EFI_OUT_OF_RESOURCES);
}
- while (CleanOriginal[StrLen(CleanOriginal)-1] == L' ') {
- CleanOriginal[StrLen(CleanOriginal)-1] = CHAR_NULL;
- }
+
+ //
+ // Remove any spaces at the beginning of the string.
+ //
while (CleanOriginal[0] == L' ') {
CopyMem(CleanOriginal, CleanOriginal+1, StrSize(CleanOriginal) - sizeof(CleanOriginal[0]));
}
+ //
+ // Handle case that passed in command line is just 1 or more " " characters.
+ //
+ if (StrLen (CleanOriginal) == 0) {
+ if (CleanOriginal != NULL) {
+ FreePool(CleanOriginal);
+ CleanOriginal = NULL;
+ }
+ return (EFI_SUCCESS);
+ }
+
+ //
+ // Remove any spaces at the end of the string.
+ //
+ while (CleanOriginal[StrLen(CleanOriginal)-1] == L' ') {
+ CleanOriginal[StrLen(CleanOriginal)-1] = CHAR_NULL;
+ }
+
CommandName = NULL;
if (StrStr(CleanOriginal, L" ") == NULL){
StrnCatGrow(&CommandName, NULL, CleanOriginal, 0);
@@ -1892,9 +1928,15 @@ RunScriptFileHandle ( Status = RunCommand(CommandLine3+1);
//
- // Now restore the pre-'@' echo state.
+ // If command was "@echo -off" or "@echo -on" then don't restore echo state
//
- ShellCommandSetEchoState(PreCommandEchoState);
+ if (StrCmp (L"@echo -off", CommandLine3) != 0 &&
+ StrCmp (L"@echo -on", CommandLine3) != 0) {
+ //
+ // Now restore the pre-'@' echo state.
+ //
+ ShellCommandSetEchoState(PreCommandEchoState);
+ }
} else {
if (ShellCommandGetEchoState()) {
CurDir = ShellInfoObject.NewEfiShellProtocol->GetEnv(L"cwd");
diff --git a/ShellPkg/Application/Shell/Shell.inf b/ShellPkg/Application/Shell/Shell.inf index c3af617430..801180ea0d 100644 --- a/ShellPkg/Application/Shell/Shell.inf +++ b/ShellPkg/Application/Shell/Shell.inf @@ -1,6 +1,7 @@ ## @file
# This is the shell application
#
+# Copyright (c) 2013, Hewlett-Packard Development Company, L.P.
# Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -106,4 +107,5 @@ gEfiShellPkgTokenSpaceGuid.PcdShellMapNameLength # ALWAYS_CONSUMED
gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize # ALWAYS_CONSUMED
gEfiShellPkgTokenSpaceGuid.PcdShellForceConsole # ALWAYS_CONSUMED
+ gEfiShellPkgTokenSpaceGuid.PcdShellSupplier # ALWAYS_CONSUMED
diff --git a/ShellPkg/Application/Shell/Shell.uni b/ShellPkg/Application/Shell/Shell.uni Binary files differindex b9ddcaed61..dae54e8c25 100644 --- a/ShellPkg/Application/Shell/Shell.uni +++ b/ShellPkg/Application/Shell/Shell.uni diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf b/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf index 936476d0d5..7316750fd8 100644 --- a/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf +++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf @@ -2,6 +2,7 @@ # Provides shell level 3 functions
# Note that the interactive versions of the time, date, and timezone functions are handled in the level 2 library.
#
+# Copyright (c) 2013, Hewlett-Packard Development Company, L.P.
# Copyright (c) 2009-2011, Intel Corporation. All rights reserved. <BR>
#
# This program and the accompanying materials
@@ -66,4 +67,5 @@ [Pcd.common]
gEfiShellPkgTokenSpaceGuid.PcdShellSupportLevel
gEfiShellPkgTokenSpaceGuid.PcdShellFileOperationSize
+ gEfiShellPkgTokenSpaceGuid.PcdShellSupplier
diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.uni b/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.uni Binary files differindex 8c3e79dda7..1a52329917 100644 --- a/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.uni +++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.uni diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/Ver.c b/ShellPkg/Library/UefiShellLevel3CommandsLib/Ver.c index e00f4c90f5..765a6a3aba 100644 --- a/ShellPkg/Library/UefiShellLevel3CommandsLib/Ver.c +++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/Ver.c @@ -1,6 +1,7 @@ /** @file
Main file for Ver shell level 3 function.
+ Copyright (c) 2013, Hewlett-Packard Development Company, L.P.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -108,8 +109,9 @@ ShellCommandRunVer ( -1,
-1,
NULL,
- STRING_TOKEN (STR_VER_EXTRA_STRING),
- gShellLevel3HiiHandle
+ STRING_TOKEN (STR_VER_OUTPUT_SUPPLIER),
+ gShellLevel3HiiHandle,
+ (CHAR16 *) PcdGetPtr (PcdShellSupplier)
);
diff --git a/ShellPkg/ShellPkg.dec b/ShellPkg/ShellPkg.dec index 3a2bef6370..3d0f5c296d 100644 --- a/ShellPkg/ShellPkg.dec +++ b/ShellPkg/ShellPkg.dec @@ -2,6 +2,7 @@ #
# This Package provides all definitions for EFI and UEFI Shell
#
+# Copyright (c) 2013, Hewlett-Packard Development Company, L.P.
# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available under
@@ -47,7 +48,7 @@ [Guids]
gEfiShellEnvironment2ExtGuid = {0xd2c18636, 0x40e5, 0x4eb5, {0xa3, 0x1b, 0x36, 0x69, 0x5f, 0xd4, 0x2c, 0x87}}
- gEfiShellPkgTokenSpaceGuid = {0x171e9188, 0x31d3, 0x40f5, {0xb1, 0x0c, 0x53, 0x9b, 0x2d, 0xb9, 0x40, 0xcd}}
+ gEfiShellPkgTokenSpaceGuid = {0x171e9188, 0x31d3, 0x40f5, {0xb1, 0x0c, 0x53, 0x9b, 0x2d, 0xb9, 0x40, 0xcd}}
gShellVariableGuid = {0x158def5a, 0xf656, 0x419c, {0xb0, 0x27, 0x7a, 0x31, 0x92, 0xc0, 0x79, 0xd2}}
gShellMapGuid = {0x51271e13, 0x7de3, 0x43af, {0x8b, 0xc2, 0x71, 0xad, 0x3b, 0x82, 0x43, 0x25}}
gShellAliasGuid = {0x0053d9d6, 0x2659, 0x4599, {0xa2, 0x6b, 0xef, 0x45, 0x36, 0xe6, 0x31, 0xa9}}
@@ -118,4 +119,7 @@ ## this flag determins the default number of screens kept for history log.
# the spec defines 3 as the minimum
- gEfiShellPkgTokenSpaceGuid.PcdShellScreenLogCount|3|UINT8|0x00000008
\ No newline at end of file + gEfiShellPkgTokenSpaceGuid.PcdShellScreenLogCount|3|UINT8|0x00000008
+
+ ## Unicode string of the shell supplier
+ gEfiShellPkgTokenSpaceGuid.PcdShellSupplier|L"EDK II"|VOID*|0x00000010
|