mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
6bc7a0882d
commit
bf1a8c0699
|
@ -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
|
||||
|
|
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue