Commit 0e0cb892 authored by Bernhard Walle's avatar Bernhard Walle Committed by Linus Torvalds

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: default avatarBernhard Walle <bernhard@bwalle.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8595c539
...@@ -373,8 +373,8 @@ void __init mount_block_root(char *name, int flags) ...@@ -373,8 +373,8 @@ void __init mount_block_root(char *name, int flags)
#ifdef CONFIG_BLOCK #ifdef CONFIG_BLOCK
__bdevname(ROOT_DEV, b); __bdevname(ROOT_DEV, b);
#endif #endif
printk("VFS: Cannot open root device \"%s\" or %s\n", printk("VFS: Cannot open root device \"%s\" or %s: error %d\n",
root_device_name, b); root_device_name, b, err);
printk("Please append a correct \"root=\" boot option; here are the available partitions:\n"); printk("Please append a correct \"root=\" boot option; here are the available partitions:\n");
printk_all_partitions(); printk_all_partitions();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment