Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1325869 > unrolled thread

[PATCH] init: print warning message if /dev/console failed to open

Started byAlexander Kuleshov <kuleshovmail@gmail.com>
First post2016-02-03 20:10 +0100
Last post2016-02-03 20:30 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] init: print warning message if /dev/console failed to open Alexander Kuleshov <kuleshovmail@gmail.com> - 2016-02-03 20:10 +0100
    Re: [PATCH] init: print warning message if /dev/console failed to open Pranith Kumar <bobby.prani@gmail.com> - 2016-02-03 20:20 +0100
    Re: [PATCH] init: print warning message if /dev/console failed to  open Peter Hurley <peter@hurleysoftware.com> - 2016-02-03 20:30 +0100

#1325869 — [PATCH] init: print warning message if /dev/console failed to open

FromAlexander Kuleshov <kuleshovmail@gmail.com>
Date2016-02-03 20:10 +0100
Subject[PATCH] init: print warning message if /dev/console failed to open
Message-ID<qYaYq-60k-7@gated-at.bofh.it>
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 init/do_mounts.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index dea5de9..ca5da05 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -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
 
-- 
2.7.0.25.gfc10eb5

[toc] | [next] | [standalone]


#1325879

FromPranith Kumar <bobby.prani@gmail.com>
Date2016-02-03 20:20 +0100
Message-ID<qYb85-63C-7@gated-at.bofh.it>
In reply to#1325869
Hello Alexander,

On Wed, Feb 3, 2016 at 1:58 PM, Alexander Kuleshov wrote:
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>

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

> ---
>  init/do_mounts.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index dea5de9..ca5da05 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -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.

> +
>  }
>  #endif
>
> --
> 2.7.0.25.gfc10eb5
>


Thanks,
-- 
Pranith

[toc] | [prev] | [next] | [standalone]


#1325890 — Re: [PATCH] init: print warning message if /dev/console failed to open

FromPeter Hurley <peter@hurleysoftware.com>
Date2016-02-03 20:30 +0100
SubjectRe: [PATCH] init: print warning message if /dev/console failed to open
Message-ID<qYbhN-67g-25@gated-at.bofh.it>
In reply to#1325869
Hi Alexander,

On 02/03/2016 10:58 AM, Alexander Kuleshov wrote:
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
>  init/do_mounts.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index dea5de9..ca5da05 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -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

> +
>  }
>  #endif
>  
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web