summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorBernhard Walle <bernhard@bwalle.de>2012-03-24 02:02:28 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-24 03:58:38 +0400
commit0e0cb892a8dac7c76321c899934705e5f0812574 (patch)
treecf58a9566e7fb6597d798b716b4b324950f23b30 /init
parent8595c539f0360477189eef91f6337ba44962f72d (diff)
downloadlinux-0e0cb892a8dac7c76321c899934705e5f0812574.tar.xz
init/do_mounts.c: print error code on mount failure
Printing the error code makes it easier to debug the cause of a mount failure. For example I had the problem that the root file system could not be mounted read-writeable because my SD card was write-protected. Without an error code it looks like the SD card was not detected at all. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/do_mounts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 2974c8b3b351..0e93f92a0345 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -373,8 +373,8 @@ retry:
#ifdef CONFIG_BLOCK
__bdevname(ROOT_DEV, b);
#endif
- printk("VFS: Cannot open root device \"%s\" or %s\n",
- root_device_name, b);
+ printk("VFS: Cannot open root device \"%s\" or %s: error %d\n",
+ root_device_name, b, err);
printk("Please append a correct \"root=\" boot option; here are the available partitions:\n");
printk_all_partitions();