[RFC PATCH 4/4] bootm: mount root device before accessing linux_rootarg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 common/bootm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/bootm.c b/common/bootm.c
index 1a9ef0673e55..b7c15cac0ba4 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -657,6 +657,8 @@ int bootm_boot(struct bootm_data *bootm_data)
 		char *rootarg;
 
 		if (bootm_data->root_dev) {
+			struct stat s;
+			stat(bootm_data->root_dev, &s); /* mount root device */
 			rootarg = path_get_linux_rootarg(bootm_data->root_dev);
 		} else {
 			rootarg = path_get_linux_rootarg(data->os_file);
-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux