aboutsummaryrefslogtreecommitdiff
path: root/boot/bootdev-uclass.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-08-24 13:55:33 -0600
committerTom Rini <trini@konsulko.com>2023-08-25 17:55:18 -0400
commitb2b7e6c1812d2b6bea517ea8f7df5c23ae04ce84 (patch)
tree5af9c4d469ac8490a65646dca9c01097599a6fbf /boot/bootdev-uclass.c
parentbcd645428c340254a0f6e3b040fd36c3006fab6c (diff)
downloadu-boot-b2b7e6c1812d2b6bea517ea8f7df5c23ae04ce84.zip
u-boot-b2b7e6c1812d2b6bea517ea8f7df5c23ae04ce84.tar.gz
u-boot-b2b7e6c1812d2b6bea517ea8f7df5c23ae04ce84.tar.bz2
part: Add an accessor for struct disk_partition sys_ind
This field is only present when a CONFIG is set. To avoid annoying #ifdefs in the source code, add an accessor. Update the only usage. Note that the accessor is optional. It can be omitted if it is known that the option is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/bootdev-uclass.c')
-rw-r--r--boot/bootdev-uclass.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index fa52bc3..c4044d8 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -184,12 +184,11 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk,
if (ret)
return log_msg_ret("fs", ret);
- /* Use an #ifdef due to info.sys_ind */
-#ifdef CONFIG_DOS_PARTITION
log_debug("%s: Found partition %x type %x fstype %d\n",
- blk->name, bflow->part, info.sys_ind,
+ blk->name, bflow->part,
+ IS_ENABLED(CONFIG_DOS_PARTITION) ?
+ disk_partition_sys_ind(&info) : 0,
ret ? -1 : fs_get_type());
-#endif
bflow->blk = blk;
bflow->state = BOOTFLOWST_FS;
}