efi_loader: HII protocols: debug messages
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 28 Feb 2019 22:56:35 +0000 (23:56 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 2 Mar 2019 22:34:26 +0000 (23:34 +0100)
When package types are not supported by our implementation of the HII
database protocol supported error messages are displayed.

Essentially the output is only needed for debugging. By using EFI_PRINT()
the messages are only written for in debug mode and with correct
indentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_hii.c

index 0ed4b1963336e83e293b689ea85eeee890e6aba0..3a966fa4dff44af1f5480320110f1c1cd724cbed 100644 (file)
@@ -388,7 +388,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");
+                       EFI_PRINT("Form package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        break;
                case EFI_HII_PACKAGE_STRINGS:
@@ -396,19 +396,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");
+                       EFI_PRINT("Font package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        break;
                case EFI_HII_PACKAGE_IMAGES:
-                       printf("\tImage package not supported\n");
+                       EFI_PRINT("Image package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        break;
                case EFI_HII_PACKAGE_SIMPLE_FONTS:
-                       printf("\tSimple font package not supported\n");
+                       EFI_PRINT("Simple font package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        break;
                case EFI_HII_PACKAGE_DEVICE_PATH:
-                       printf("\tDevice path package not supported\n");
+                       EFI_PRINT("Device path package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        break;
                case EFI_HII_PACKAGE_KEYBOARD_LAYOUT:
@@ -416,7 +416,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");
+                       EFI_PRINT("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");
+                       EFI_PRINT("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");
+                       EFI_PRINT("Font package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        break;
                case EFI_HII_PACKAGE_IMAGES:
-                       printf("\tImage package not supported\n");
+                       EFI_PRINT("Image package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        break;
                case EFI_HII_PACKAGE_SIMPLE_FONTS:
-                       printf("\tSimple font package not supported\n");
+                       EFI_PRINT("Simple font package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        break;
                case EFI_HII_PACKAGE_DEVICE_PATH:
-                       printf("\tDevice path package not supported\n");
+                       EFI_PRINT("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");
+                       EFI_PRINT("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");
+                       EFI_PRINT("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");
+                       EFI_PRINT("Font package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        continue;
                case EFI_HII_PACKAGE_IMAGES:
-                       printf("\tImage package not supported\n");
+                       EFI_PRINT("Image package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        continue;
                case EFI_HII_PACKAGE_SIMPLE_FONTS:
-                       printf("\tSimple font package not supported\n");
+                       EFI_PRINT("Simple font package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        continue;
                case EFI_HII_PACKAGE_DEVICE_PATH:
-                       printf("\tDevice path package not supported\n");
+                       EFI_PRINT("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");
+                       EFI_PRINT("Animation package not supported\n");
                        ret = EFI_INVALID_PARAMETER;
                        continue;
                case EFI_HII_PACKAGE_END: