summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2013-09-02 02:21:40 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2013-09-02 02:21:40 +0000
commitbf1a8c06996a0d4d1a4893970bc55ccc3cd6f95b (patch)
treef71ca64bb283e6961620f804af15f940ace7b668
parent6bc7a0882d278227ef3107bf24c9b9712aa62732 (diff)
Update sample code for date/time.
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14614 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr58
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c14
2 files changed, 10 insertions, 62 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
index 0a77e408f..affd45ad1 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 ba72d1220..6dcb4aa77 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -1255,13 +1255,6 @@ GetQuestionValue (
}
//
- // Statement don't have storage, skip them
- //
- if (Question->QuestionId == 0) {
- return Status;
- }
-
- //
// Question value is provided by an Expression, evaluate it
//
if (Question->ValueExpression != NULL) {
@@ -1677,13 +1670,6 @@ SetQuestionValue (
}
//
- // 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
//
if (Question->ValueExpression != NULL) {