diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2015-06-19 09:02:03 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-06-19 09:02:03 +1000 |
commit | 6460a2227b880ac611ad652ca340762bdad96638 (patch) | |
tree | 48f6b76410b8f03d014c05d3eda041533d8425da /init | |
parent | 4e52620ecb52081651d12243c8faa3e52a7ced41 (diff) |
init-do_mounts-add-create_dev-failure-log-fix
simplify printk(), use pr_emerg(), display errno
Cc: Dan Ehrenberg <dehrenberg@chromium.org>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Vishnu Pratap Singh <vishnu.ps@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/do_mounts.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c index 3b7c1e4ddb1b..dea5de95c2dd 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -533,9 +533,13 @@ void __init mount_root(void) } #endif #ifdef CONFIG_BLOCK - 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); + { + int err = create_dev("/dev/root", ROOT_DEV); + + if (err < 0) + pr_emerg("Failed to create /dev/root: %d\n", err); + mount_block_root("/dev/root", root_mountflags); + } #endif } |