---
 common/bootm.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/common/bootm.c b/common/bootm.c
index 3772fa4c2c51..1a9ef0673e55 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -656,7 +656,11 @@ int bootm_boot(struct bootm_data *bootm_data)
        if (bootm_data->appendroot) {
                char *rootarg;
 
-               rootarg = path_get_linux_rootarg(data->os_file);
+               if (bootm_data->root_dev) {
+                       rootarg = path_get_linux_rootarg(bootm_data->root_dev);
+               } else {
+                       rootarg = path_get_linux_rootarg(data->os_file);
+               }
                if (!IS_ERR(rootarg)) {
                        printf("Adding \"%s\" to Kernel commandline\n", 
rootarg);
                        globalvar_add_simple("linux.bootargs.bootm.appendroot",
-- 
2.7.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to