From mboxrd@z Thu Jan 1 00:00:00 1970 From: AKASHI Takahiro Date: Fri, 1 Mar 2019 10:03:02 +0900 Subject: [U-Boot] [PATCH 1/1] efi_loader: HII protocols: informative error message In-Reply-To: <20190228230237.30128-1-xypron.glpk@gmx.de> References: <20190228230237.30128-1-xypron.glpk@gmx.de> Message-ID: <20190301010301.GX20286@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Mar 01, 2019 at 12:02:37AM +0100, Heinrich Schuchardt wrote: > When package types are not supported an error message is displayed. > Unfortunately there is no hint in the messages that they concern the HII > protocols. Furthermore they are indent by tab for no obvious reason. I think that I intended to use EFI_PRINT() here, but printf() is fine for showing informative error messages. > Prefix the messages by "HII: " instead of "\t". "EFI HII" would be better? Thanks, -Takahiro Akashi > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/efi_hii.c | 36 ++++++++++++++++++------------------ > 1 file changed, 18 insertions(+), 18 deletions(-) > > diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c > index d63d2d84184..6ee386596a5 100644 > --- a/lib/efi_loader/efi_hii.c > +++ b/lib/efi_loader/efi_hii.c > @@ -387,7 +387,7 @@ add_packages(struct efi_hii_packagelist *hii, > (struct efi_hii_guid_package *)package); > break; > case EFI_HII_PACKAGE_FORMS: > - printf("\tForm package not supported\n"); > + printf("HII: Form package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_STRINGS: > @@ -395,19 +395,19 @@ add_packages(struct efi_hii_packagelist *hii, > (struct efi_hii_strings_package *)package); > break; > case EFI_HII_PACKAGE_FONTS: > - printf("\tFont package not supported\n"); > + printf("HII: Font package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_IMAGES: > - printf("\tImage package not supported\n"); > + printf("HII: Image package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_SIMPLE_FONTS: > - printf("\tSimple font package not supported\n"); > + printf("HII: Simple font package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_DEVICE_PATH: > - printf("\tDevice path package not supported\n"); > + printf("HII: Device path package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_KEYBOARD_LAYOUT: > @@ -415,7 +415,7 @@ add_packages(struct efi_hii_packagelist *hii, > (struct efi_hii_keyboard_package *)package); > break; > case EFI_HII_PACKAGE_ANIMATIONS: > - printf("\tAnimation package not supported\n"); > + printf("HII: Animation package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_END: > @@ -522,33 +522,33 @@ update_package_list(const struct efi_hii_database_protocol *this, > remove_guid_package(hii); > break; > case EFI_HII_PACKAGE_FORMS: > - printf("\tForm package not supported\n"); > + printf("HII: Form package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_STRINGS: > remove_strings_package(hii); > break; > case EFI_HII_PACKAGE_FONTS: > - printf("\tFont package not supported\n"); > + printf("HII: Font package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_IMAGES: > - printf("\tImage package not supported\n"); > + printf("HII: Image package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_SIMPLE_FONTS: > - printf("\tSimple font package not supported\n"); > + printf("HII: Simple font package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_DEVICE_PATH: > - printf("\tDevice path package not supported\n"); > + printf("HII: Device path package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_KEYBOARD_LAYOUT: > remove_keyboard_package(hii); > break; > case EFI_HII_PACKAGE_ANIMATIONS: > - printf("\tAnimation package not supported\n"); > + printf("HII: Animation package not supported\n"); > ret = EFI_INVALID_PARAMETER; > break; > case EFI_HII_PACKAGE_END: > @@ -609,7 +609,7 @@ list_package_lists(const struct efi_hii_database_protocol *this, > break; > continue; > case EFI_HII_PACKAGE_FORMS: > - printf("\tForm package not supported\n"); > + printf("HII: Form package not supported\n"); > ret = EFI_INVALID_PARAMETER; > continue; > case EFI_HII_PACKAGE_STRINGS: > @@ -617,19 +617,19 @@ list_package_lists(const struct efi_hii_database_protocol *this, > break; > continue; > case EFI_HII_PACKAGE_FONTS: > - printf("\tFont package not supported\n"); > + printf("HII: Font package not supported\n"); > ret = EFI_INVALID_PARAMETER; > continue; > case EFI_HII_PACKAGE_IMAGES: > - printf("\tImage package not supported\n"); > + printf("HII: Image package not supported\n"); > ret = EFI_INVALID_PARAMETER; > continue; > case EFI_HII_PACKAGE_SIMPLE_FONTS: > - printf("\tSimple font package not supported\n"); > + printf("HII: Simple font package not supported\n"); > ret = EFI_INVALID_PARAMETER; > continue; > case EFI_HII_PACKAGE_DEVICE_PATH: > - printf("\tDevice path package not supported\n"); > + printf("HII: Device path package not supported\n"); > ret = EFI_INVALID_PARAMETER; > continue; > case EFI_HII_PACKAGE_KEYBOARD_LAYOUT: > @@ -637,7 +637,7 @@ list_package_lists(const struct efi_hii_database_protocol *this, > break; > continue; > case EFI_HII_PACKAGE_ANIMATIONS: > - printf("\tAnimation package not supported\n"); > + printf("HII: Animation package not supported\n"); > ret = EFI_INVALID_PARAMETER; > continue; > case EFI_HII_PACKAGE_END: > -- > 2.20.1 >