/[linux-patches]/genpatches-2.6/trunk/3.7/2900_dev-root-proc-mount-fix.patch
Gentoo

Contents of /genpatches-2.6/trunk/3.7/2900_dev-root-proc-mount-fix.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2264 - (show annotations) (download)
Sat Jan 26 00:22:40 2013 UTC (18 months ago) by mpagano
File size: 915 byte(s)
Ensure that /dev/root doesn't appear in /proc/mounts when bootint without an initramfs.
1 --- a/init/do_mounts.c 2013-01-25 19:11:11.609802424 -0500
2 +++ b/init/do_mounts.c 2013-01-25 19:14:20.606053568 -0500
3 @@ -461,7 +461,10 @@ void __init change_floppy(char *fmt, ...
4 va_start(args, fmt);
5 vsprintf(buf, fmt, args);
6 va_end(args);
7 - fd = sys_open("/dev/root", O_RDWR | O_NDELAY, 0);
8 + if (saved_root_name[0])
9 + fd = sys_open(saved_root_name, O_RDWR | O_NDELAY, 0);
10 + else
11 + fd = sys_open("/dev/root", O_RDWR | O_NDELAY, 0);
12 if (fd >= 0) {
13 sys_ioctl(fd, FDEJECT, 0);
14 sys_close(fd);
15 @@ -505,7 +508,13 @@ void __init mount_root(void)
16 #endif
17 #ifdef CONFIG_BLOCK
18 create_dev("/dev/root", ROOT_DEV);
19 - mount_block_root("/dev/root", root_mountflags);
20 + if (saved_root_name[0]) {
21 + create_dev(saved_root_name, ROOT_DEV);
22 + mount_block_root(saved_root_name, root_mountflags);
23 + } else {
24 + create_dev("/dev/root", ROOT_DEV);
25 + mount_block_root("/dev/root", root_mountflags);
26 + }
27 #endif
28 }
29

  ViewVC Help
Powered by ViewVC 1.1.20