mirror of
https://xff.cz/git/u-boot/
synced 2025-09-30 15:01:27 +02:00
efi_loader: debug output for HII protocols
For correct indention use EFI_PRINT() instead of debug(). For printing efi_uintn_t or size_t use the %zu or %zx format code. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
committed by
Alexander Graf
parent
f38753d2ef
commit
6f8f4217e7
@@ -132,13 +132,13 @@ add_strings_package(struct efi_hii_packagelist *hii,
|
|||||||
struct efi_string_table *stbl = NULL;
|
struct efi_string_table *stbl = NULL;
|
||||||
efi_status_t ret;
|
efi_status_t ret;
|
||||||
|
|
||||||
debug("header_size: %08x\n",
|
EFI_PRINT("header_size: %08x\n",
|
||||||
get_unaligned_le32(&strings_package->header_size));
|
get_unaligned_le32(&strings_package->header_size));
|
||||||
debug("string_info_offset: %08x\n",
|
EFI_PRINT("string_info_offset: %08x\n",
|
||||||
get_unaligned_le32(&strings_package->string_info_offset));
|
get_unaligned_le32(&strings_package->string_info_offset));
|
||||||
debug("language_name: %u\n",
|
EFI_PRINT("language_name: %u\n",
|
||||||
get_unaligned_le16(&strings_package->language_name));
|
get_unaligned_le16(&strings_package->language_name));
|
||||||
debug("language: %s\n", strings_package->language);
|
EFI_PRINT("language: %s\n", strings_package->language);
|
||||||
|
|
||||||
/* count # of string entries: */
|
/* count # of string entries: */
|
||||||
end = ((void *)strings_package)
|
end = ((void *)strings_package)
|
||||||
@@ -160,7 +160,7 @@ add_strings_package(struct efi_hii_packagelist *hii,
|
|||||||
block = end;
|
block = end;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
debug("unknown HII string block type: %02x\n",
|
EFI_PRINT("unknown HII string block type: %02x\n",
|
||||||
block->block_type);
|
block->block_type);
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,7 @@ add_strings_package(struct efi_hii_packagelist *hii,
|
|||||||
struct efi_hii_sibt_string_ucs2_block *ucs2;
|
struct efi_hii_sibt_string_ucs2_block *ucs2;
|
||||||
|
|
||||||
ucs2 = (void *)block;
|
ucs2 = (void *)block;
|
||||||
debug("%4u: \"%ls\"\n", idx + 1, ucs2->string_text);
|
EFI_PRINT("%4u: \"%ls\"\n", idx + 1, ucs2->string_text);
|
||||||
stbl->strings[idx].string =
|
stbl->strings[idx].string =
|
||||||
u16_strdup(ucs2->string_text);
|
u16_strdup(ucs2->string_text);
|
||||||
if (!stbl->strings[idx].string) {
|
if (!stbl->strings[idx].string) {
|
||||||
@@ -210,7 +210,7 @@ add_strings_package(struct efi_hii_packagelist *hii,
|
|||||||
case EFI_HII_SIBT_END:
|
case EFI_HII_SIBT_END:
|
||||||
goto out;
|
goto out;
|
||||||
default:
|
default:
|
||||||
debug("unknown HII string block type: %02x\n",
|
EFI_PRINT("unknown HII string block type: %02x\n",
|
||||||
block->block_type);
|
block->block_type);
|
||||||
ret = EFI_INVALID_PARAMETER;
|
ret = EFI_INVALID_PARAMETER;
|
||||||
goto error;
|
goto error;
|
||||||
@@ -372,12 +372,12 @@ add_packages(struct efi_hii_packagelist *hii,
|
|||||||
end = ((void *)package_list)
|
end = ((void *)package_list)
|
||||||
+ get_unaligned_le32(&package_list->package_length);
|
+ get_unaligned_le32(&package_list->package_length);
|
||||||
|
|
||||||
debug("package_list: %pUl (%u)\n", &package_list->package_list_guid,
|
EFI_PRINT("package_list: %pUl (%u)\n", &package_list->package_list_guid,
|
||||||
get_unaligned_le32(&package_list->package_length));
|
get_unaligned_le32(&package_list->package_length));
|
||||||
|
|
||||||
package = ((void *)package_list) + sizeof(*package_list);
|
package = ((void *)package_list) + sizeof(*package_list);
|
||||||
while ((void *)package < end) {
|
while ((void *)package < end) {
|
||||||
debug("package=%p, package type=%x, length=%u\n", package,
|
EFI_PRINT("package=%p, package type=%x, length=%u\n", package,
|
||||||
efi_hii_package_type(package),
|
efi_hii_package_type(package),
|
||||||
efi_hii_package_len(package));
|
efi_hii_package_len(package));
|
||||||
|
|
||||||
@@ -505,7 +505,7 @@ update_package_list(const struct efi_hii_database_protocol *this,
|
|||||||
if (!package_list)
|
if (!package_list)
|
||||||
return EFI_EXIT(EFI_INVALID_PARAMETER);
|
return EFI_EXIT(EFI_INVALID_PARAMETER);
|
||||||
|
|
||||||
debug("package_list: %pUl (%u)\n", &package_list->package_list_guid,
|
EFI_PRINT("package_list: %pUl (%u)\n", &package_list->package_list_guid,
|
||||||
get_unaligned_le32(&package_list->package_length));
|
get_unaligned_le32(&package_list->package_length));
|
||||||
|
|
||||||
package = ((void *)package_list) + sizeof(*package_list);
|
package = ((void *)package_list) + sizeof(*package_list);
|
||||||
@@ -513,7 +513,7 @@ update_package_list(const struct efi_hii_database_protocol *this,
|
|||||||
+ get_unaligned_le32(&package_list->package_length);
|
+ get_unaligned_le32(&package_list->package_length);
|
||||||
|
|
||||||
while ((void *)package < end) {
|
while ((void *)package < end) {
|
||||||
debug("package=%p, package type=%x, length=%u\n", package,
|
EFI_PRINT("package=%p, package type=%x, length=%u\n", package,
|
||||||
efi_hii_package_type(package),
|
efi_hii_package_type(package),
|
||||||
efi_hii_package_len(package));
|
efi_hii_package_len(package));
|
||||||
|
|
||||||
@@ -595,7 +595,7 @@ list_package_lists(const struct efi_hii_database_protocol *this,
|
|||||||
(package_type == EFI_HII_PACKAGE_TYPE_GUID && !package_guid))
|
(package_type == EFI_HII_PACKAGE_TYPE_GUID && !package_guid))
|
||||||
return EFI_EXIT(EFI_INVALID_PARAMETER);
|
return EFI_EXIT(EFI_INVALID_PARAMETER);
|
||||||
|
|
||||||
debug("package type=%x, guid=%pUl, length=%lu\n", (int)package_type,
|
EFI_PRINT("package type=%x, guid=%pUl, length=%zu\n", (int)package_type,
|
||||||
package_guid, *handle_buffer_length);
|
package_guid, *handle_buffer_length);
|
||||||
|
|
||||||
package_cnt = 0;
|
package_cnt = 0;
|
||||||
@@ -1041,7 +1041,7 @@ get_languages(const struct efi_hii_string_protocol *this,
|
|||||||
}
|
}
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
||||||
debug("languages: %s\n", languages);
|
EFI_PRINT("languages: %s\n", languages);
|
||||||
|
|
||||||
return EFI_EXIT(EFI_SUCCESS);
|
return EFI_EXIT(EFI_SUCCESS);
|
||||||
}
|
}
|
||||||
|
@@ -124,7 +124,7 @@ form_callback(const struct efi_hii_config_access_protocol *this,
|
|||||||
union efi_ifr_type_value *value,
|
union efi_ifr_type_value *value,
|
||||||
efi_browser_action_request_t *action_request)
|
efi_browser_action_request_t *action_request)
|
||||||
{
|
{
|
||||||
EFI_ENTRY("%p, 0x%lx, 0x%x, 0x%x, %p, %p", this, action,
|
EFI_ENTRY("%p, 0x%zx, 0x%x, 0x%x, %p, %p", this, action,
|
||||||
question_id, type, value, action_request);
|
question_id, type, value, action_request);
|
||||||
|
|
||||||
return EFI_EXIT(EFI_DEVICE_ERROR);
|
return EFI_EXIT(EFI_DEVICE_ERROR);
|
||||||
|
Reference in New Issue
Block a user