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
This commit is contained in:
jcarsey
2011-05-25 22:29:40 +00:00
parent 9fd2164e34
commit 2e8e9ed5ed
3 changed files with 21 additions and 17 deletions

View File

@ -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);