summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch')
-rw-r--r--patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch b/patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch
new file mode 100644
index 0000000..047eddb
--- /dev/null
+++ b/patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch
@@ -0,0 +1,42 @@
1From 179b7f41d5509f93cd297cc81c5d8da4a3123d9d Mon Sep 17 00:00:00 2001
2From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
3Date: Fri, 20 Nov 2015 14:01:26 -0600
4Subject: [PATCH 113/114] init: do_mounts: recreate /dev/root
5
6Rootfs shows as is mounted in /dev/root, but this devices is not present in
7/dev directory.
8
9Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
10---
11 init/do_mounts.c | 8 ++++++++
12 1 file changed, 8 insertions(+)
13
14diff --git a/init/do_mounts.c b/init/do_mounts.c
15index 40725f0f5fb3..78b5b1dba8ca 100644
16--- a/init/do_mounts.c
17+++ b/init/do_mounts.c
18@@ -550,6 +550,7 @@ void __init mount_root(void)
19 void __init prepare_namespace(void)
20 {
21 int is_floppy;
22+ int err;
23
24 if (root_delay) {
25 printk(KERN_INFO "Waiting %d sec before mounting root device...\n",
26@@ -604,6 +605,13 @@ void __init prepare_namespace(void)
27 devtmpfs_mount("dev");
28 sys_mount(".", "/", NULL, MS_MOVE, NULL);
29 sys_chroot(".");
30+#ifdef CONFIG_BLOCK
31+ /* recreate the /dev/root */
32+ err = create_dev("/dev/root", ROOT_DEV);
33+
34+ if (err < 0)
35+ pr_emerg("Failed to create /dev/root: %d\n", err);
36+#endif
37 }
38
39 static bool is_tmpfs;
40--
412.11.1
42