Re: [edk2] [PATCH] SecurityPkg/OpalPassword: Update strings on Opal Setup page
Hi Maggie, Thanks for your contribution. Reviewed-by: Eric Dong Pushed: SHA-1: 315873959ec3e0a44168efdf4c03fe6160121cdb Thanks, Eric > -Original Message- > From: Chu, Maggie > Sent: Wednesday, February 13, 2019 2:56 PM > To: edk2-devel@lists.01.org > Cc: Zhang, Chao B ; Yao, Jiewen > ; Dong, Eric > Subject: [PATCH] SecurityPkg/OpalPassword: Update strings on Opal Setup > page > > https://bugzilla.tianocore.org/show_bug.cgi?id=1506 > Updated some descriptions on SETUP page to avoid user confusion. > Currently it shows "1.0 UEFI Opal Driver", however it may be mislead user to > think it is only for Opal drive but not for Pyrite drive. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Maggie Chu > Cc: Chao Zhang > Cc: Jiewen Yao > Cc: Eric Dong > --- > SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 10 -- > SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h | 11 --- > SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c | 16 > +--- > SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni | 11 ++ > - > SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordForm.vfr | 4 ++-- > 5 files changed, 9 insertions(+), 43 deletions(-) > > diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c > b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c > index 4336604d0d..51aa93c2fd 100644 > --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c > +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c > @@ -393,7 +393,6 @@ OpalHiiAddPackages( >) > { >EFI_HANDLE DriverHandle; > - CHAR16 *NewString; > >DriverHandle = HiiGetDriverImageHandleCB(); > > @@ -416,15 +415,6 @@ OpalHiiAddPackages( > return EFI_OUT_OF_RESOURCES; >} > > - // > - // Update Version String in main window > - // > - NewString = HiiGetDriverNameCB (); > - if (HiiSetString(gHiiPackageListHandle, > STRING_TOKEN(STR_MAIN_OPAL_VERSION), NewString, NULL) == 0) { > -DEBUG ((DEBUG_INFO, "OpalHiiAddPackages: HiiSetString( ) failed\n")); > -return EFI_OUT_OF_RESOURCES; > - } > - >return EFI_SUCCESS; > } > > diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h > b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h > index 8b368fe995..e137a55810 100644 > --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h > +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h > @@ -285,17 +285,6 @@ OpalHiiAddPackages( >VOID >); > > -/** > - Returns the driver name. > - > - @retval Returns the driver name. > - > -**/ > -CHAR16* > -HiiGetDriverNameCB( > - VOID > - ); > - > /** >Returns the opaque pointer to a physical disk context. > > diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c > b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c > index 31e1aa2240..1b6f067076 100644 > --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c > +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c > @@ -115,18 +115,4 @@ HiiDiskGetNameCB( > return Ctx->NameZ; >} >return NULL; > -} > - > -/** > - Returns the driver name. > - > - @retval Returns the driver name. > - > -**/ > -CHAR16* > -HiiGetDriverNameCB( > - VOID > - ) > -{ > - return (CHAR16*)EFI_DRIVER_NAME_UNICODE; -} > +} > \ No newline at end of file > diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni > b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni > index 5f753dfa8c..44cfc80626 100644 > --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni > +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni > @@ -20,14 +20,14 @@ > #string STR_NULL#language en-US " " > > / FORM SET > / > -#string STR_FORM_SET_HELP#language en-US "Manage Opal > disks" > +#string STR_FORM_SET_HELP#language en-US "Select to > manage" > > / MULTIPLE FORMS > / > -#string STR_OPAL #language en-US "Opal" > -#string STR_MAIN_OPAL_VERSION#language en-US "Version > 00.0.0." > +#string STR_OPAL #language en-US "TCG Drive > Management" > > / MAIN MENU FORM > / > #string STR_MAIN_PHY_DISKS_LBL #language en-US "Physical > Disks:" > +#string STR_MAIN_OPAL_TITLE_LBL #language en-US "Allows user > to choose drive to configure drive security. User can also set storage action > policy for use of the TCG Block SID authentication feature." > > #string STR_MAIN_GOTO_DISK_INFO_0#language en-US " " > #string STR_MAIN_GOTO_DISK_INFO_1#language en-US " " > @@ -36,13 +36,14 @@ > #string STR_MAIN_GOTO_DISK_INFO_4#language en-US " " > #string
[edk2] [PATCH] SecurityPkg/OpalPassword: Update strings on Opal Setup page
https://bugzilla.tianocore.org/show_bug.cgi?id=1506 Updated some descriptions on SETUP page to avoid user confusion. Currently it shows "1.0 UEFI Opal Driver", however it may be mislead user to think it is only for Opal drive but not for Pyrite drive. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Maggie Chu Cc: Chao Zhang Cc: Jiewen Yao Cc: Eric Dong --- SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 10 -- SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h | 11 --- SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c | 16 +--- SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni | 11 ++- SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordForm.vfr | 4 ++-- 5 files changed, 9 insertions(+), 43 deletions(-) diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c index 4336604d0d..51aa93c2fd 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c @@ -393,7 +393,6 @@ OpalHiiAddPackages( ) { EFI_HANDLE DriverHandle; - CHAR16 *NewString; DriverHandle = HiiGetDriverImageHandleCB(); @@ -416,15 +415,6 @@ OpalHiiAddPackages( return EFI_OUT_OF_RESOURCES; } - // - // Update Version String in main window - // - NewString = HiiGetDriverNameCB (); - if (HiiSetString(gHiiPackageListHandle, STRING_TOKEN(STR_MAIN_OPAL_VERSION), NewString, NULL) == 0) { -DEBUG ((DEBUG_INFO, "OpalHiiAddPackages: HiiSetString( ) failed\n")); -return EFI_OUT_OF_RESOURCES; - } - return EFI_SUCCESS; } diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h index 8b368fe995..e137a55810 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h @@ -285,17 +285,6 @@ OpalHiiAddPackages( VOID ); -/** - Returns the driver name. - - @retval Returns the driver name. - -**/ -CHAR16* -HiiGetDriverNameCB( - VOID - ); - /** Returns the opaque pointer to a physical disk context. diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c index 31e1aa2240..1b6f067076 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c @@ -115,18 +115,4 @@ HiiDiskGetNameCB( return Ctx->NameZ; } return NULL; -} - -/** - Returns the driver name. - - @retval Returns the driver name. - -**/ -CHAR16* -HiiGetDriverNameCB( - VOID - ) -{ - return (CHAR16*)EFI_DRIVER_NAME_UNICODE; -} +} \ No newline at end of file diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni index 5f753dfa8c..44cfc80626 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni @@ -20,14 +20,14 @@ #string STR_NULL#language en-US " " / FORM SET / -#string STR_FORM_SET_HELP#language en-US "Manage Opal disks" +#string STR_FORM_SET_HELP#language en-US "Select to manage" / MULTIPLE FORMS / -#string STR_OPAL #language en-US "Opal" -#string STR_MAIN_OPAL_VERSION#language en-US "Version 00.0.0." +#string STR_OPAL #language en-US "TCG Drive Management" / MAIN MENU FORM / #string STR_MAIN_PHY_DISKS_LBL #language en-US "Physical Disks:" +#string STR_MAIN_OPAL_TITLE_LBL #language en-US "Allows user to choose drive to configure drive security. User can also set storage action policy for use of the TCG Block SID authentication feature." #string STR_MAIN_GOTO_DISK_INFO_0#language en-US " " #string STR_MAIN_GOTO_DISK_INFO_1#language en-US " " @@ -36,13 +36,14 @@ #string STR_MAIN_GOTO_DISK_INFO_4#language en-US " " #string STR_MAIN_GOTO_DISK_INFO_5#language en-US " " -#string STR_MAIN_GOTO_DISK_INFO_HELP #language en-US "Select to see Opal disk actions" +#string STR_MAIN_GOTO_DISK_INFO_HELP #language en-US "Select disk to see actions" #string STR_MAIN_NO_DISKS_PRESENT_LBL#language en-US "No disks connected to system" #string STR_MAIN_NO_DISKS_PRESENT_LBL_HELP #language en-US "The storage needs to be connected before EndOfDxe" / DISK INFO MENU FORM / #string STR_DISK_INFO_SELECTED_DISK_NAME #language en-US " " +#string
Re: [edk2] [PATCH] SecurityPkg/OpalPassword: Update strings on Opal Setup page
Hi Maggie, Thanks for your patch. Please also remember to clean up the code if it is not needed anymore, such as HiiGetDriverNameCB function and STR_MAIN_OPAL_VERSION string. Thanks, Eric > -Original Message- > From: Chu, Maggie > Sent: Friday, February 1, 2019 6:38 PM > To: edk2-devel@lists.01.org > Cc: Zhang, Chao B ; Yao, Jiewen > ; Dong, Eric > Subject: [PATCH] SecurityPkg/OpalPassword: Update strings on Opal Setup > page > > https://bugzilla.tianocore.org/show_bug.cgi?id=1506 > Updated some descriptions on SETUP page to avoid user confusion. > Currently it shows "1.0 UEFI Opal Driver", however it may be mislead user to > think it is only for Opal drive but not for Pyrite drive. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Maggie Chu > Cc: Chao Zhang > Cc: Jiewen Yao > Cc: Eric Dong > --- > SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 10 -- > SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni | 10 ++ > SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordForm.vfr | 4 ++-- > 3 files changed, 8 insertions(+), 16 deletions(-) > > diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c > b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c > index 4336604d0d..51aa93c2fd 100644 > --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c > +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c > @@ -393,7 +393,6 @@ OpalHiiAddPackages( >) > { >EFI_HANDLE DriverHandle; > - CHAR16 *NewString; > >DriverHandle = HiiGetDriverImageHandleCB(); > > @@ -416,15 +415,6 @@ OpalHiiAddPackages( > return EFI_OUT_OF_RESOURCES; >} > > - // > - // Update Version String in main window > - // > - NewString = HiiGetDriverNameCB (); > - if (HiiSetString(gHiiPackageListHandle, > STRING_TOKEN(STR_MAIN_OPAL_VERSION), NewString, NULL) == 0) { > -DEBUG ((DEBUG_INFO, "OpalHiiAddPackages: HiiSetString( ) failed\n")); > -return EFI_OUT_OF_RESOURCES; > - } > - >return EFI_SUCCESS; > } > > diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni > b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni > index 5f753dfa8c..d818a66bdb 100644 > --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni > +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni > @@ -20,14 +20,15 @@ > #string STR_NULL#language en-US " " > > / FORM SET > / > -#string STR_FORM_SET_HELP#language en-US "Manage Opal > disks" > +#string STR_FORM_SET_HELP#language en-US "Select to > manage" > > / MULTIPLE FORMS > / > -#string STR_OPAL #language en-US "Opal" > +#string STR_OPAL #language en-US "TCG Drive > Management" > #string STR_MAIN_OPAL_VERSION#language en-US "Version > 00.0.0." > > / MAIN MENU FORM > / > #string STR_MAIN_PHY_DISKS_LBL #language en-US "Physical > Disks:" > +#string STR_MAIN_OPAL_TITLE_LBL #language en-US "Allows user > to choose drive to configure drive security. User can also set storage action > policy for use of the TCG Block SID authentication feature." > > #string STR_MAIN_GOTO_DISK_INFO_0#language en-US " " > #string STR_MAIN_GOTO_DISK_INFO_1#language en-US " " > @@ -36,13 +37,14 @@ > #string STR_MAIN_GOTO_DISK_INFO_4#language en-US " " > #string STR_MAIN_GOTO_DISK_INFO_5#language en-US " " > > -#string STR_MAIN_GOTO_DISK_INFO_HELP #language en-US "Select > to see Opal disk actions" > +#string STR_MAIN_GOTO_DISK_INFO_HELP #language en-US "Select > disk to see actions" > > #string STR_MAIN_NO_DISKS_PRESENT_LBL#language en-US "No > disks connected to system" > #string STR_MAIN_NO_DISKS_PRESENT_LBL_HELP #language en-US "The > storage needs to be connected before EndOfDxe" > > / DISK INFO MENU FORM > / > #string STR_DISK_INFO_SELECTED_DISK_NAME #language en-US " " > +#string STR_DISK_INFO_TITLE_LBL #language en-US "Allows > user to > set and modify password; perform secure erase; and perform revert > functions on drive." > > #string STR_DISK_INFO_LOCK #language en-US "Lock" > #string STR_DISK_INFO_UNLOCK #language en-US "Unlock" > @@ -69,7 +71,7 @@ > #string STR_BLOCKSID_STATUS2 #language en-US "" > #string STR_BLOCKSID_STATUS3 #language en-US "" > > -#string STR_OPAL_REQUESTS_LBL#language en-US "Opal > Password Requests:" > +#string
[edk2] [PATCH] SecurityPkg/OpalPassword: Update strings on Opal Setup page
https://bugzilla.tianocore.org/show_bug.cgi?id=1506 Updated some descriptions on SETUP page to avoid user confusion. Currently it shows "1.0 UEFI Opal Driver", however it may be mislead user to think it is only for Opal drive but not for Pyrite drive. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Maggie Chu Cc: Chao Zhang Cc: Jiewen Yao Cc: Eric Dong --- SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 10 -- SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni | 10 ++ SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordForm.vfr | 4 ++-- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c index 4336604d0d..51aa93c2fd 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c @@ -393,7 +393,6 @@ OpalHiiAddPackages( ) { EFI_HANDLE DriverHandle; - CHAR16 *NewString; DriverHandle = HiiGetDriverImageHandleCB(); @@ -416,15 +415,6 @@ OpalHiiAddPackages( return EFI_OUT_OF_RESOURCES; } - // - // Update Version String in main window - // - NewString = HiiGetDriverNameCB (); - if (HiiSetString(gHiiPackageListHandle, STRING_TOKEN(STR_MAIN_OPAL_VERSION), NewString, NULL) == 0) { -DEBUG ((DEBUG_INFO, "OpalHiiAddPackages: HiiSetString( ) failed\n")); -return EFI_OUT_OF_RESOURCES; - } - return EFI_SUCCESS; } diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni index 5f753dfa8c..d818a66bdb 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiFormStrings.uni @@ -20,14 +20,15 @@ #string STR_NULL#language en-US " " / FORM SET / -#string STR_FORM_SET_HELP#language en-US "Manage Opal disks" +#string STR_FORM_SET_HELP#language en-US "Select to manage" / MULTIPLE FORMS / -#string STR_OPAL #language en-US "Opal" +#string STR_OPAL #language en-US "TCG Drive Management" #string STR_MAIN_OPAL_VERSION#language en-US "Version 00.0.0." / MAIN MENU FORM / #string STR_MAIN_PHY_DISKS_LBL #language en-US "Physical Disks:" +#string STR_MAIN_OPAL_TITLE_LBL #language en-US "Allows user to choose drive to configure drive security. User can also set storage action policy for use of the TCG Block SID authentication feature." #string STR_MAIN_GOTO_DISK_INFO_0#language en-US " " #string STR_MAIN_GOTO_DISK_INFO_1#language en-US " " @@ -36,13 +37,14 @@ #string STR_MAIN_GOTO_DISK_INFO_4#language en-US " " #string STR_MAIN_GOTO_DISK_INFO_5#language en-US " " -#string STR_MAIN_GOTO_DISK_INFO_HELP #language en-US "Select to see Opal disk actions" +#string STR_MAIN_GOTO_DISK_INFO_HELP #language en-US "Select disk to see actions" #string STR_MAIN_NO_DISKS_PRESENT_LBL#language en-US "No disks connected to system" #string STR_MAIN_NO_DISKS_PRESENT_LBL_HELP #language en-US "The storage needs to be connected before EndOfDxe" / DISK INFO MENU FORM / #string STR_DISK_INFO_SELECTED_DISK_NAME #language en-US " " +#string STR_DISK_INFO_TITLE_LBL #language en-US "Allows user to set and modify password; perform secure erase; and perform revert functions on drive." #string STR_DISK_INFO_LOCK #language en-US "Lock" #string STR_DISK_INFO_UNLOCK #language en-US "Unlock" @@ -69,7 +71,7 @@ #string STR_BLOCKSID_STATUS2 #language en-US "" #string STR_BLOCKSID_STATUS3 #language en-US "" -#string STR_OPAL_REQUESTS_LBL#language en-US "Opal Password Requests:" +#string STR_OPAL_REQUESTS_LBL#language en-US "Options:" #string STR_DISK_INFO_LOCK_HELP #language en-US "Lock the disk" #string STR_DISK_INFO_UNLOCK_HELP#language en-US "Unlock the disk" #string STR_DISK_INFO_SET_ADMIN_PSWD_HELP#language en-US "Set password for the administrator, reset is required for the request to be processed in next boot" diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordForm.vfr b/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordForm.vfr index d802ef305d..773d349c2b 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordForm.vfr +++