public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] init: print warning message if /dev/console failed to open
@ 2016-02-03 18:58 Alexander Kuleshov
  2016-02-03 19:09 ` Pranith Kumar
  2016-02-03 19:29 ` Peter Hurley
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Kuleshov @ 2016-02-03 18:58 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Paul E . McKenney, Pranith Kumar, David Howells, Tejun Heo,
	Johannes Weiner, David Woodhouse, linux-kernel,
	Alexander Kuleshov

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] init: print warning message if /dev/console failed to open
  2016-02-03 18:58 [PATCH] init: print warning message if /dev/console failed to open Alexander Kuleshov
@ 2016-02-03 19:09 ` Pranith Kumar
  2016-02-03 19:29 ` Peter Hurley
  1 sibling, 0 replies; 3+ messages in thread
From: Pranith Kumar @ 2016-02-03 19:09 UTC (permalink / raw)
  To: Alexander Kuleshov
  Cc: Andrew Morton, Paul E . McKenney, David Howells, Tejun Heo,
	Johannes Weiner, David Woodhouse, LKML

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] init: print warning message if /dev/console failed to open
  2016-02-03 18:58 [PATCH] init: print warning message if /dev/console failed to open Alexander Kuleshov
  2016-02-03 19:09 ` Pranith Kumar
@ 2016-02-03 19:29 ` Peter Hurley
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Hurley @ 2016-02-03 19:29 UTC (permalink / raw)
  To: Alexander Kuleshov
  Cc: Andrew Morton, Paul E . McKenney, Pranith Kumar, David Howells,
	Tejun Heo, Johannes Weiner, David Woodhouse, linux-kernel

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
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-03 19:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-03 18:58 [PATCH] init: print warning message if /dev/console failed to open Alexander Kuleshov
2016-02-03 19:09 ` Pranith Kumar
2016-02-03 19:29 ` Peter Hurley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox