[PATCH 022/112] commands: stat: display bootable partition table bit info
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Jan 3 10:11:42 PST 2024
There's no common code yet, but board code may iterate over cdevs to
handle the boot partition specially. Make writing such code easier
by adding the new flags to the stat command's output.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
fs/fs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/fs.c b/fs/fs.c
index a7097dd3946e..b3eac2e55ad6 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -101,6 +101,10 @@ void cdev_print(const struct cdev *cdev)
printf(" gpt-partitioned");
if (cdev->mtd)
printf(" mtd");
+ if (cdev->flags & DEVFS_PARTITION_BOOTABLE_ESP)
+ printf(" boot-esp");
+ if (cdev->flags & DEVFS_PARTITION_BOOTABLE_LEGACY)
+ printf(" boot-legacy");
printf(" )");
}
printf("\n");
--
2.39.2
More information about the barebox
mailing list