summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-08-15 13:48:35 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-08-16 10:26:30 +0200
commitbc3b97aa04fbfacd0186b4e5122882e6986c0463 (patch)
tree5842f9f459fe8c21a7f86ee5c5bbfdd4cb281691 /common
parente22e7157ffdbeb94306502aea3beb52d5e909723 (diff)
downloadbarebox-bc3b97aa04fbfacd0186b4e5122882e6986c0463.tar.gz
barebox-bc3b97aa04fbfacd0186b4e5122882e6986c0463.tar.xz
common: bootm: reuse cdev_get_linux_rootarg()
CONFIG_MMCBLKDEV_ROOTARG=y so far had no effect on the root= option generated by $global.bootm.root_dev. Have the bootm code reuse cdev_get_linux_rootarg(), so it behaves the same as with boot from file system. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220815114835.2277946-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/bootm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/bootm.c b/common/bootm.c
index c0f7bca6ce..2f02c156e5 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -710,9 +710,8 @@ int bootm_boot(struct bootm_data *bootm_data)
const char *root_dev_name = devpath_to_name(bootm_data->root_dev);
const struct cdev *root_cdev = cdev_by_name(root_dev_name);
- if (root_cdev && root_cdev->uuid[0] != 0) {
- rootarg = basprintf("root=PARTUUID=%s", root_cdev->uuid);
- } else {
+ rootarg = cdev_get_linux_rootarg(root_cdev);
+ if (!rootarg) {
rootarg = ERR_PTR(-EINVAL);
if (!root_cdev)