From bf1a8c06996a0d4d1a4893970bc55ccc3cd6f95b Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Mon, 2 Sep 2013 02:21:40 +0000 Subject: Update sample code for date/time. Signed-off-by: Eric Dong Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14614 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr | 58 +++++--------------------- MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 14 ------- 2 files changed, 10 insertions(+), 62 deletions(-) diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr index 0a77e408fa..affd45ad1c 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -521,30 +521,12 @@ formset form formid = 2, // SecondSetupPage, title = STRING_TOKEN(STR_FORM2_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code - - date year varid = Date.Year, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_HELP), - minimum = 1998, - maximum = 2099, - step = 1, - default = 2004, - - month varid = Date.Month, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_HELP), - minimum = 1, - maximum = 12, - step = 1, - default = 1, - - day varid = Date.Day, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_DATE_PROMPT), - help = STRING_TOKEN(STR_DATE_HELP), - minimum = 1, - maximum = 31, - step = 0x1, - default = 1, + date + name = Date, + prompt = STRING_TOKEN(STR_DATE_PROMPT), + help = STRING_TOKEN(STR_DATE_HELP), + flags = STORAGE_TIME, + default = 1/1/2004, inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), ideqval Date.Day == 31 @@ -589,30 +571,10 @@ formset flags = INTERACTIVE, key = 0x1242; - time hour varid = Time.Hour, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_HELP), - minimum = 0, - maximum = 23, - step = 1, - default = 0, - - minute varid = Time.Minute, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_HELP), - minimum = 0, - maximum = 59, - step = 1, - default = 0, - - second varid = Time.Second, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_HELP), - minimum = 0, - maximum = 59, - step = 1, - default = 0, - + time + prompt = STRING_TOKEN(STR_TIME_PROMPT), + help = STRING_TOKEN(STR_TIME_HELP), + flags = STORAGE_TIME, endtime; time diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index ba72d1220b..6dcb4aa77e 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -1254,13 +1254,6 @@ GetQuestionValue ( return EFI_INVALID_PARAMETER; } - // - // Statement don't have storage, skip them - // - if (Question->QuestionId == 0) { - return Status; - } - // // Question value is provided by an Expression, evaluate it // @@ -1676,13 +1669,6 @@ SetQuestionValue ( return EFI_INVALID_PARAMETER; } - // - // Statement don't have storage, skip them - // - if (Question->QuestionId == 0) { - return Status; - } - // // If Question value is provided by an Expression, then it is read only // -- cgit v1.2.3