summaryrefslogtreecommitdiff
path: root/disk/part_efi.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-10-18 07:36:52 -0400
committerTom Rini <trini@konsulko.com>2022-10-18 07:36:52 -0400
commit700b4fe782f9fc46b7be1b1a93a49356baeccc3f (patch)
tree7c4f01a95ceb7288ac9f95ffb59c2ea11b0a33cf /disk/part_efi.c
parentd3031d442b941f059eb83bb67ca10a28a0539f9a (diff)
parentae0bf2214b81b56a5670819958234947443680be (diff)
Merge tag 'dm-pull-18oct22' of https://source.denx.de/u-boot/custodians/u-boot-dm
Update uclass iterators to work better when devices fail to probe Support VBE OS requests / fixups Minor error-handling tweaks to bootm command
Diffstat (limited to 'disk/part_efi.c')
-rw-r--r--disk/part_efi.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/disk/part_efi.c b/disk/part_efi.c
index ad94504ed90..26738a57d5d 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -264,20 +264,19 @@ int part_get_info_efi(struct blk_desc *dev_desc, int part,
/* "part" argument must be at least 1 */
if (part < 1) {
- printf("%s: Invalid Argument(s)\n", __func__);
- return -1;
+ log_debug("Invalid Argument(s)\n");
+ return -EINVAL;
}
/* This function validates AND fills in the GPT header and PTE */
if (find_valid_gpt(dev_desc, gpt_head, &gpt_pte) != 1)
- return -1;
+ return -EINVAL;
if (part > le32_to_cpu(gpt_head->num_partition_entries) ||
!is_pte_valid(&gpt_pte[part - 1])) {
- debug("%s: *** ERROR: Invalid partition number %d ***\n",
- __func__, part);
+ log_debug("*** ERROR: Invalid partition number %d ***\n", part);
free(gpt_pte);
- return -1;
+ return -EPERM;
}
/* The 'lbaint_t' casting may limit the maximum disk size to 2 TB */
@@ -300,8 +299,8 @@ int part_get_info_efi(struct blk_desc *dev_desc, int part,
info->type_guid, UUID_STR_FORMAT_GUID);
#endif
- debug("%s: start 0x" LBAF ", size 0x" LBAF ", name %s\n", __func__,
- info->start, info->size, info->name);
+ log_debug("start 0x" LBAF ", size 0x" LBAF ", name %s\n", info->start,
+ info->size, info->name);
/* Remember to free pte */
free(gpt_pte);