init: print warning message if /dev/console failed to open
PATCH 1/1 init: print warning message if /dev/console failed to open
Signed-off-by Alexander Kuleshov <[email protected]>
--- init/do_mounts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
init/do_mounts.c +3 -1
@@ -505,7 +505,9 @@ void __init change_floppy(char *fmt, ...) termios.c_lflag |=ICANON ;sys_ioctl (fd,TCSETSF , (long )&termios); sys_close(fd); - } + }else +pr_err ("Warning: unable to open /dev/console.\n" ); + }#endif
Signature · 1 line
2.7.0.25.gfc10eb5
Hello Alexander,
Quoted 1 line · Alexander Kuleshov
Signed-off-by Alexander Kuleshov <[email protected]>
Please describe the changes in each patch. Why do you need this warning?
If you haven't read it yet, please read (esp. Section 2):
https://www.kernel.org/doc/Documentation/SubmittingPatches
Quoted 9 lines
--- init/do_mounts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)init/do_mounts.c +0
-0
init/do_mounts.c void __init change_floppy(char *fmt, ...) · line 509
Quoted 6 lines
init/do_mounts.c +2
-1@@ -505,7 +505,9 @@ void __init change_floppy(char *fmt, ...) termios.c_lflag |=ICANON ;sys_ioctl (fd,TCSETSF , (long )&termios);sys_close (fd); - } + }else +pr_err ("Warning: unable to open /dev/console.\n" );
Your message says 'Warning'. But you use pr_err(). I think pr_warn() might be a better option.
Quoted 7 lines
init/do_mounts.c +1
-1+ }#endif --2.7.0.25.gfc10eb5
Thanks,
Signature · 1 line
Pranith
Hi Alexander,
Quoted 10 lines · Alexander Kuleshov
Signed-off-by Alexander Kuleshov <[email protected]>--- init/do_mounts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)init/do_mounts.c +0
-0
init/do_mounts.c void __init change_floppy(char *fmt, ...) · line 509
Quoted 6 lines
init/do_mounts.c +2
-1@@ -505,7 +505,9 @@ void __init change_floppy(char *fmt, ...) termios.c_lflag |=ICANON ;sys_ioctl (fd,TCSETSF , (long )&termios);sys_close (fd); - } + }else +pr_err ("Warning: unable to open /dev/console.\n" );
I think you should include the -fd error code as well.
Is this failure new?
Regards,
Peter Hurley
Quoted 5 lines
init/do_mounts.c +1
-0+ }#endif