lkml.org 
[lkml]   [2015]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] init/do_mounts: Add create_dev() failure log
On Mon 2015-05-25 19:19:43, Vishnu Pratap Singh wrote:
> if create_dev() function fails to create the root mount device (/dev/root),
> then it goes to panic as root device not found but there is no check/log
> present in case of failure, So i have added the log in case it fails to create
> the root device. It will help in debugging.
>
> Signed-off-by: Vishnu Pratap Singh <vishnu.ps@samsung.com>
> ---
> init/do_mounts.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index 8369ffa..a68aaf6 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -532,7 +532,8 @@ void __init mount_root(void)
> }
> #endif
> #ifdef CONFIG_BLOCK
> - create_dev("/dev/root", ROOT_DEV);
> + if(create_dev("/dev/root", ROOT_DEV) < 0)
> + printk(KERN_ERR "Failed to create %s device !!\n", "/dev/root");

No change, AFAICT. Please fix stuff I pointed in the email, and you
can get my acked-by ;-).
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2015-05-26 08:41    [W:0.059 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site