Skip to content

Commit

Permalink
init/do_mounts.c: print error code on mount failure
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
bwalle authored and torvalds committed Mar 23, 2012
1 parent 8595c53 commit 0e0cb89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init/do_mounts.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ void __init mount_block_root(char *name, int flags)
#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();
Expand Down

0 comments on commit 0e0cb89

Please sign in to comment.