Improving experience is the shell is good. Assuming that Laszlo's suggestion is implemented.
Reviewed-by: Jaben Carsey <jaben.car...@intel.com> > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Laszlo Ersek > Sent: Friday, February 01, 2019 2:25 AM > To: Nikita Leshenko <nikita.leshche...@oracle.com>; edk2- > de...@lists.01.org > Cc: liran.a...@oracle.com > Subject: Re: [edk2] [PATCH 03/14] OvmfPkg/MptScsiDxe: Report name of > driver > Importance: High > > On 01/31/19 11:07, Nikita Leshenko wrote: > > Install Component Name protocols to have a nice display name for the > > driver in places such as UEFI shell. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Nikita Leshenko <nikita.leshche...@oracle.com> > > Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> > > Reviewed-by: Aaron Young <aaron.yo...@oracle.com> > > Reviewed-by: Liran Alon <liran.a...@oracle.com> > > --- > > OvmfPkg/MptScsiDxe/MptScsi.c | 61 > ++++++++++++++++++++++++++++++++++-- > > 1 file changed, 59 insertions(+), 2 deletions(-) > > > > diff --git a/OvmfPkg/MptScsiDxe/MptScsi.c > b/OvmfPkg/MptScsiDxe/MptScsi.c > > index 4dcb1b1ae5..38cdda1abe 100644 > > --- a/OvmfPkg/MptScsiDxe/MptScsi.c > > +++ b/OvmfPkg/MptScsiDxe/MptScsi.c > > @@ -71,6 +71,63 @@ EFI_DRIVER_BINDING_PROTOCOL > gMptScsiDriverBinding = { > > NULL, // DriverBindingHandle filled by > EfiLibInstallDriverBindingComponentName2 > > }; > > > > +// > > +// Component Name > > +// > > + > > +STATIC > > +EFI_UNICODE_STRING_TABLE mDriverNameTable[] = { > > + { "eng;en", L"LSI Fusion MPT SCSI Driver" }, > > + { NULL, NULL } > > +}; > > + > > +STATIC > > +EFI_COMPONENT_NAME_PROTOCOL gComponentName; > > + > > +EFI_STATUS > > +EFIAPI > > +MptScsiGetDriverName ( > > + IN EFI_COMPONENT_NAME_PROTOCOL *This, > > + IN CHAR8 *Language, > > + OUT CHAR16 **DriverName > > + ) > > +{ > > + return LookupUnicodeString2 ( > > + Language, > > + This->SupportedLanguages, > > + mDriverNameTable, > > + DriverName, > > + (BOOLEAN) (This == &gComponentName) // Iso639Language > > + ); > > +} > > + > > +EFI_STATUS > > +EFIAPI > > +MptScsiGetDeviceName ( > > + IN EFI_COMPONENT_NAME_PROTOCOL *This, > > + IN EFI_HANDLE DeviceHandle, > > + IN EFI_HANDLE ChildHandle, > > + IN CHAR8 *Language, > > + OUT CHAR16 **ControllerName > > + ) > > +{ > > + return EFI_UNSUPPORTED; > > +} > > + > > +STATIC > > +EFI_COMPONENT_NAME_PROTOCOL gComponentName = { > > + &MptScsiGetDriverName, > > + &MptScsiGetDeviceName, > > + "eng" // SupportedLanguages, ISO 639-2 language codes > > +}; > > + > > +STATIC > > +EFI_COMPONENT_NAME2_PROTOCOL gComponentName2 = { > > + (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) > &MptScsiGetDriverName, > > + (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) > &MptScsiGetDeviceName, > > + "en" // SupportedLanguages, RFC 4646 language codes > > +}; > > + > > // > > // Entry Point > > // > > @@ -87,7 +144,7 @@ MptScsiEntryPoint ( > > SystemTable, > > &gMptScsiDriverBinding, > > ImageHandle, // The handle to install onto > > - NULL, // TODO Component name > > - NULL // TODO Component name > > + &gComponentName, > > + &gComponentName2 > > ); > > } > > > > (1) Please replace the "g" prefix with "m" in gComponentName and > gComponentName2. With that: > > Reviewed-by: Laszlo Ersek <ler...@redhat.com> > > Thanks > Laszlo > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel