diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2015-06-05 15:03:42 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-06-05 15:03:42 +1000 |
commit | 509ba9853d0876695a61d369b348ab38d0594e74 (patch) | |
tree | d7839a1295bf1868d8a18c4579bf224e140b20f8 | |
parent | 452b74d4982016a8da63bf9d7fd62008f5fbd7e3 (diff) | |
download | linux-next-509ba9853d0876695a61d369b348ab38d0594e74.tar.gz |
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>
-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 3b7c1e4ddb1bad..dea5de95c2dd23 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 } |