diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-25 22:29:40 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-25 22:29:40 +0000 |
commit | 2e8e9ed5ed0a348946c585ceecf611a2cec7f6da (patch) | |
tree | 899533358cbf0850eb5cf4a2772629ea5ef3df1e /ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | |
parent | 9fd2164e34b9f3e1aa6bde07f513f43a6a08e588 (diff) | |
download | edk2-platforms-2e8e9ed5ed0a348946c585ceecf611a2cec7f6da.tar.xz |
Remove ASSERT within Ls for RTC error and associated changes.
TimeDate.c: replace magic number with constant.
Ls.c: use new warning printout string and remove an ASSERT. also replace magic number with constant.
The UNI file: add new warning printout string.
Signed-off-by: jcarsey
Reviewed-by: geekboy15a
Reviewed-by: lgrosenb
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11703 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c')
-rw-r--r-- | ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c index 64dfae3291..ac71350ef4 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c @@ -538,7 +538,11 @@ ShellCommandRunLs ( StrnCatGrow(&FullPath, NULL, L"*", 0);
}
Status = gRT->GetTime(&TheTime, NULL);
- ASSERT_EFI_ERROR(Status);
+ if (EFI_ERROR(Status)) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"gRT->GetTime", Status);
+ TheTime.TimeZone = EFI_UNSPECIFIED_TIMEZONE;
+ }
+
SfoMode = ShellCommandLineGetFlag(Package, L"-sfo");
if (ShellStatus == SHELL_SUCCESS) {
ShellStatus = PrintLsOutput(
@@ -548,7 +552,7 @@ ShellCommandRunLs ( FullPath,
TRUE,
Count,
- (INT16)(TheTime.TimeZone==2047?0:TheTime.TimeZone)
+ (INT16)(TheTime.TimeZone==EFI_UNSPECIFIED_TIMEZONE?0:TheTime.TimeZone)
);
if (ShellStatus == SHELL_NOT_FOUND) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_FILES), gShellLevel2HiiHandle);
|