summaryrefslogtreecommitdiff
blob: aa6fa19d3b1f75d0af68e6271654dde9b8cf0a7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- a/init/do_mounts.c	2015-03-28 15:38:01.750855358 -0400
+++ b/init/do_mounts.c	2015-03-28 15:41:47.873853202 -0400
@@ -485,7 +485,10 @@ void __init change_floppy(char *fmt, ...
 	va_start(args, fmt);
 	vsprintf(buf, fmt, args);
 	va_end(args);
-	fd = sys_open("/dev/root", O_RDWR | O_NDELAY, 0);
+	if (saved_root_name[0])
+		fd = sys_open(saved_root_name, O_RDWR | O_NDELAY, 0);
+	else
+		fd = sys_open("/dev/root", O_RDWR | O_NDELAY, 0);
 	if (fd >= 0) {
 		sys_ioctl(fd, FDEJECT, 0);
 		sys_close(fd);
@@ -528,8 +531,13 @@ void __init mount_root(void)
 	}
 #endif
 #ifdef CONFIG_BLOCK
-	create_dev("/dev/root", ROOT_DEV);
-	mount_block_root("/dev/root", root_mountflags);
+	if (saved_root_name[0] == '/') {
+		create_dev(saved_root_name, ROOT_DEV);
+		mount_block_root(saved_root_name, root_mountflags);
+	} else {
+		create_dev("/dev/root", ROOT_DEV);
+		mount_block_root("/dev/root", root_mountflags);
+	}
 #endif
 }