summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-27 20:28:23 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-27 20:28:23 +0000
commit35f26e73cc8b26acbd990ec63e1c2d5f60b1a9e7 (patch)
tree3b24cbd67121789e9b2141d1c9e6ebef42d2e73d /ShellPkg
parent03131de30e71d759aceb301da1607278cc43e27d (diff)
downloadedk2-platforms-35f26e73cc8b26acbd990ec63e1c2d5f60b1a9e7.tar.xz
replace assert with error.
signed-off-by: jcarsey reviewed-by: lgrosenb git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11897 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c
index 80ababbb6a..44e83ba254 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c
@@ -102,7 +102,10 @@ CheckAndSetDate (
}
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);
+ return (SHELL_DEVICE_ERROR);
+ }
DateStringCopy = NULL;
DateStringCopy = StrnCatGrow(&DateStringCopy, NULL, DateString, 0);