mirror of https://github.com/acidanthera/audk.git
SecurityPkg OpalPasswordDxe: Change BlockSid position.
The BlockSid feature is a global level feature instead of device level feature. So move the menu from device page to the main page. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
parent
b20e0d29fa
commit
8d3d84508f
|
@ -464,9 +464,6 @@ DriverCallback(
|
|||
|
||||
case HII_KEY_ID_ENTER_PASSWORD:
|
||||
return HiiPasswordEntered(Value->string);
|
||||
|
||||
case HII_KEY_ID_BLOCKSID:
|
||||
return HiiSetBlockSid(Value->b);
|
||||
}
|
||||
} else if (Action == EFI_BROWSER_ACTION_CHANGED) {
|
||||
switch (HiiKeyId) {
|
||||
|
@ -474,6 +471,11 @@ DriverCallback(
|
|||
HiiPsidRevert();
|
||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
|
||||
return EFI_SUCCESS;
|
||||
|
||||
case HII_KEY_ID_BLOCKSID:
|
||||
HiiSetBlockSid(Value->b);
|
||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -561,7 +563,6 @@ HiiPopulateDiskInfoForm(
|
|||
gHiiConfiguration.SelectedDiskAvailableActions |= (AvailActions.UserPass == 1) ? HII_ACTION_SET_USER_PWD : HII_ACTION_NONE;
|
||||
gHiiConfiguration.SelectedDiskAvailableActions |= (AvailActions.SecureErase == 1) ? HII_ACTION_SECURE_ERASE : HII_ACTION_NONE;
|
||||
gHiiConfiguration.SelectedDiskAvailableActions |= (AvailActions.DisableUser == 1) ? HII_ACTION_DISABLE_USER : HII_ACTION_NONE;
|
||||
gHiiConfiguration.SelectedDiskAvailableActions |= HII_ACTION_ENABLE_BLOCKSID;
|
||||
|
||||
HiiSetFormString (STRING_TOKEN(STR_DISK_INFO_PSID_REVERT), "PSID Revert to factory default and Disable");
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@ typedef struct {
|
|||
#define HII_ACTION_REVERT 0x0080
|
||||
#define HII_ACTION_DISABLE_FEATURE 0x0100
|
||||
#define HII_ACTION_ENABLE_FEATURE 0x0200
|
||||
#define HII_ACTION_ENABLE_BLOCKSID 0x0400
|
||||
|
||||
/* Flags for diskActionAvailableFields */
|
||||
#define HII_FIELD_PASSWORD 0x0001
|
||||
|
|
|
@ -116,6 +116,17 @@ form formid = FORMID_VALUE_MAIN_MENU,
|
|||
text = STRING_TOKEN(STR_MAIN_NO_DISKS_PRESENT_LBL);
|
||||
endif;
|
||||
|
||||
subtitle text = STRING_TOKEN(STR_NULL);
|
||||
|
||||
oneof varid = OpalHiiConfig.EnableBlockSid,
|
||||
questionid = 0x8017, // 32791,
|
||||
prompt = STRING_TOKEN(STR_DISK_INFO_ENABLE_BLOCKSID),
|
||||
help = STRING_TOKEN(STR_DISK_INFO_GOTO_ENABLE_BLOCKSID_HELP),
|
||||
flags = INTERACTIVE,
|
||||
option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
|
||||
option text = STRING_TOKEN(STR_ENABLED), value = 1, flags = RESET_REQUIRED;
|
||||
endoneof;
|
||||
|
||||
endform; // MAIN MENU FORM
|
||||
|
||||
//
|
||||
|
@ -219,17 +230,6 @@ form formid = FORMID_VALUE_DISK_INFO_FORM_MAIN,
|
|||
key = 0x800A; //32778;
|
||||
endif;
|
||||
|
||||
suppressif ( questionref(SelectedDiskAvailableActions) & HII_ACTION_ENABLE_BLOCKSID ) == 0;
|
||||
oneof varid = OpalHiiConfig.EnableBlockSid,
|
||||
questionid = 0x8017, // 32791,
|
||||
prompt = STRING_TOKEN(STR_DISK_INFO_ENABLE_BLOCKSID),
|
||||
help = STRING_TOKEN(STR_DISK_INFO_GOTO_ENABLE_BLOCKSID_HELP),
|
||||
flags = INTERACTIVE,
|
||||
option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
|
||||
option text = STRING_TOKEN(STR_ENABLED), value = 1, flags = RESET_REQUIRED;
|
||||
endoneof;
|
||||
endif;
|
||||
|
||||
endform; // DISK INFO FORM
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue