aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishnu Pratap Singh <vishnu.ps@samsung.com>2015-06-05 15:03:42 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2015-06-05 15:03:42 +1000
commit452b74d4982016a8da63bf9d7fd62008f5fbd7e3 (patch)
tree17029bb53c4836ba366923aacae6d70f188d36f7
parente3a498bc2c32cdfb1109d037c8d6b1a9d81be079 (diff)
downloadlinux-next-452b74d4982016a8da63bf9d7fd62008f5fbd7e3.tar.gz
init/do_mounts.c: add create_dev() failure log
If create_dev() function fails to create the root mount device (/dev/root), then it goes to panic as root device not found but there is no printk in this case. So I have added the log in case it fails to create the root device. It will help in debugging. Signed-off-by: Vishnu Pratap Singh <vishnu.ps@samsung.com> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Mike Snitzer <snitzer@redhat.com> Cc: Dan Ehrenberg <dehrenberg@chromium.org> Cc: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--init/do_mounts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index a95bbdb2a50232..3b7c1e4ddb1bad 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -533,7 +533,8 @@ void __init mount_root(void)
}
#endif
#ifdef CONFIG_BLOCK
- create_dev("/dev/root", ROOT_DEV);
+ if (create_dev("/dev/root", ROOT_DEV) < 0)
+ pr_err("Failed to create %s device !\n", "/dev/root");
mount_block_root("/dev/root", root_mountflags);
#endif
}