From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BE429211C608E for ; Fri, 1 Feb 2019 07:13:42 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2019 07:13:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,549,1539673200"; d="scan'208";a="271766330" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga004.jf.intel.com with ESMTP; 01 Feb 2019 07:13:40 -0800 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.205]) by FMSMSX105.amr.corp.intel.com ([169.254.4.102]) with mapi id 14.03.0415.000; Fri, 1 Feb 2019 07:13:40 -0800 From: "Carsey, Jaben" To: Nikita Leshenko , "edk2-devel@lists.01.org" CC: "liran.alon@oracle.com" , Laszlo Ersek Thread-Topic: [edk2] [PATCH 03/14] OvmfPkg/MptScsiDxe: Report name of driver Thread-Index: AQHUuUzseaRMvWniik+fj37+E9di5qXLRF0A///KG/A= Date: Fri, 1 Feb 2019 15:13:40 +0000 Message-ID: References: <20190131100724.20907-1-nikita.leshchenko@oracle.com> <20190131100724.20907-4-nikita.leshchenko@oracle.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmNkMjdhZDQtMDFlMy00Y2FiLWJlYjktMzI3NDRhYWJkZmJlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUkk1TUhUenJyNkZaZzhuUjQrUk5NNEhYSkxzS3NDQktjcGRubnNWU0NBUEZESjJmZWllSFlCYWhhQWRES2JtUiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.1.200.106] MIME-Version: 1.0 Subject: Re: [PATCH 03/14] OvmfPkg/MptScsiDxe: Report name of driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2019 15:13:43 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Improving experience is the shell is good. Assuming that Laszlo's suggestion is implemented. Reviewed-by: Jaben Carsey > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Laszlo Ersek > Sent: Friday, February 01, 2019 2:25 AM > To: Nikita Leshenko ; edk2- > devel@lists.01.org > Cc: liran.alon@oracle.com > Subject: Re: [edk2] [PATCH 03/14] OvmfPkg/MptScsiDxe: Report name of > driver > Importance: High >=20 > 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 > > Reviewed-by: Konrad Rzeszutek Wilk > > Reviewed-by: Aaron Young > > Reviewed-by: Liran Alon > > --- > > 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 =3D { > > NULL, // DriverBindingHandle filled by > EfiLibInstallDriverBindingComponentName2 > > }; > > > > +// > > +// Component Name > > +// > > + > > +STATIC > > +EFI_UNICODE_STRING_TABLE mDriverNameTable[] =3D { > > + { "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 =3D=3D &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 =3D { > > + &MptScsiGetDriverName, > > + &MptScsiGetDeviceName, > > + "eng" // SupportedLanguages, ISO 639-2 language codes > > +}; > > + > > +STATIC > > +EFI_COMPONENT_NAME2_PROTOCOL gComponentName2 =3D { > > + (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 > > ); > > } > > >=20 > (1) Please replace the "g" prefix with "m" in gComponentName and > gComponentName2. With that: >=20 > Reviewed-by: Laszlo Ersek >=20 > Thanks > Laszlo > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel