* [uml-devel] [PATCH] make quiet suppress parse_chan_pair boot messages
@ 2008-05-03 20:18 Rob Landley
2008-05-04 20:48 ` Geert Uytterhoeven
2008-05-09 15:22 ` Jeff Dike
0 siblings, 2 replies; 5+ messages in thread
From: Rob Landley @ 2008-05-03 20:18 UTC (permalink / raw)
To: uml-devel
From: Rob Landley <rob@landley.net>
I usually use UML as a better fakeroot, meaning I run it with a command line
like "rootfstype=hostfs rw quiet init=/path/to/some_shell_script.sh". In this
context, filling the screen with parse_chan_pair error messages which don't
actually hurt anything defeats the purpose of "quiet".
The patch turns several KERN_ERR into KERN_WARNING. While I was there, I
merged the redundant printk() statements into a function, and added one "else"
after a test-for-null that did a printk but didn't do a continue.
Signed-off-by: Rob Landley <rob@landley.net>
---
arch/um/drivers/chan_kern.c | 31 +++++++++++++++----------------
arch/um/drivers/line.c | 4 ++--
2 files changed, 17 insertions(+), 18 deletions(-)
diff -r 7c6e2a3db359 arch/um/drivers/chan_kern.c
--- a/arch/um/drivers/chan_kern.c Wed Apr 30 11:52:52 2008 -0700
+++ b/arch/um/drivers/chan_kern.c Sat May 03 15:03:20 2008 -0500
@@ -10,61 +10,60 @@
#include "os.h"
#ifdef CONFIG_NOCONFIG_CHAN
+
+static void not_configged_warn(void)
+{
+ printk(KERN_WARNING "Using a channel type which is configured out of "
+ "UML\n");
+}
+
static void *not_configged_init(char *str, int device,
const struct chan_opts *opts)
{
- printk(KERN_ERR "Using a channel type which is configured out of "
- "UML\n");
+ not_configged_warn();
return NULL;
}
static int not_configged_open(int input, int output, int primary, void *data,
char **dev_out)
{
- printk(KERN_ERR "Using a channel type which is configured out of "
- "UML\n");
+ not_configged_warn();
return -ENODEV;
}
static void not_configged_close(int fd, void *data)
{
- printk(KERN_ERR "Using a channel type which is configured out of "
- "UML\n");
+ not_configged_warn();
}
static int not_configged_read(int fd, char *c_out, void *data)
{
- printk(KERN_ERR "Using a channel type which is configured out of "
- "UML\n");
+ not_configged_warn();
return -EIO;
}
static int not_configged_write(int fd, const char *buf, int len, void *data)
{
- printk(KERN_ERR "Using a channel type which is configured out of "
- "UML\n");
+ not_configged_warn();
return -EIO;
}
static int not_configged_console_write(int fd, const char *buf, int len)
{
- printk(KERN_ERR "Using a channel type which is configured out of "
- "UML\n");
+ not_configged_warn();
return -EIO;
}
static int not_configged_window_size(int fd, void *data, unsigned short *rows,
unsigned short *cols)
{
- printk(KERN_ERR "Using a channel type which is configured out of "
- "UML\n");
+ not_configged_warn();
return -ENODEV;
}
static void not_configged_free(void *data)
{
- printk(KERN_ERR "Using a channel type which is configured out of "
- "UML\n");
+ not_configged_warn();
}
static const struct chan_ops not_configged_ops = {
diff -r 7c6e2a3db359 arch/um/drivers/line.c
--- a/arch/um/drivers/line.c Wed Apr 30 11:52:52 2008 -0700
+++ b/arch/um/drivers/line.c Sat May 03 15:03:20 2008 -0500
@@ -717,8 +717,8 @@
if (line->init_str == NULL)
printk(KERN_ERR "lines_init - kstrdup returned NULL\n");
- if (parse_chan_pair(line->init_str, line, i, opts, &error)) {
- printk(KERN_ERR "parse_chan_pair failed for "
+ else if (parse_chan_pair(line->init_str, line, i, opts, &error)) {
+ printk(KERN_WARNING "parse_chan_pair failed for "
"device %d : %s\n", i, error);
line->valid = 0;
}
--
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [uml-devel] [PATCH] make quiet suppress parse_chan_pair boot messages
2008-05-03 20:18 [uml-devel] [PATCH] make quiet suppress parse_chan_pair boot messages Rob Landley
@ 2008-05-04 20:48 ` Geert Uytterhoeven
2008-05-09 15:22 ` Jeff Dike
1 sibling, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2008-05-04 20:48 UTC (permalink / raw)
To: Rob Landley; +Cc: uml-devel
On Sat, 3 May 2008, Rob Landley wrote:
> + printk(KERN_WARNING "Using a channel type which is configured out of "
> + "UML\n");
If you would use pr_warning(), it would fit nicely on a single line.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [uml-devel] [PATCH] make quiet suppress parse_chan_pair boot messages
2008-05-03 20:18 [uml-devel] [PATCH] make quiet suppress parse_chan_pair boot messages Rob Landley
2008-05-04 20:48 ` Geert Uytterhoeven
@ 2008-05-09 15:22 ` Jeff Dike
2008-05-17 19:08 ` Rob Landley
1 sibling, 1 reply; 5+ messages in thread
From: Jeff Dike @ 2008-05-09 15:22 UTC (permalink / raw)
To: Rob Landley; +Cc: uml-devel
On Sat, May 03, 2008 at 03:18:10PM -0500, Rob Landley wrote:
> I usually use UML as a better fakeroot, meaning I run it with a command line
> like "rootfstype=hostfs rw quiet init=/path/to/some_shell_script.sh". In this
> context, filling the screen with parse_chan_pair error messages which don't
> actually hurt anything defeats the purpose of "quiet".
>
> The patch turns several KERN_ERR into KERN_WARNING. While I was there, I
> merged the redundant printk() statements into a function, and added one "else"
> after a test-for-null that did a printk but didn't do a continue.
Looks reasonable.
Jeff
--
Work email - jdike at linux dot intel dot com
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [uml-devel] [PATCH] make quiet suppress parse_chan_pair boot messages
2008-05-09 15:22 ` Jeff Dike
@ 2008-05-17 19:08 ` Rob Landley
2008-05-19 16:12 ` [uml-devel] [PATCH] make quiet suppress parse_chan_pair boot?messages Jeff Dike
0 siblings, 1 reply; 5+ messages in thread
From: Rob Landley @ 2008-05-17 19:08 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Jeff Dike
On Friday 09 May 2008 10:22:17 Jeff Dike wrote:
> On Sat, May 03, 2008 at 03:18:10PM -0500, Rob Landley wrote:
> > I usually use UML as a better fakeroot, meaning I run it with a command
> > line like "rootfstype=hostfs rw quiet
> > init=/path/to/some_shell_script.sh". In this context, filling the screen
> > with parse_chan_pair error messages which don't actually hurt anything
> > defeats the purpose of "quiet".
> >
> > The patch turns several KERN_ERR into KERN_WARNING. While I was there, I
> > merged the redundant printk() statements into a function, and added one
> > "else" after a test-for-null that did a printk but didn't do a continue.
>
> Looks reasonable.
Do I have to do anything to follow up, or is it queued to go upstream? (I can
redo the printk() with pr_warning(), it's just the original didn't and I
didn't change it...)
Rob
--
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-05-19 16:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-03 20:18 [uml-devel] [PATCH] make quiet suppress parse_chan_pair boot messages Rob Landley
2008-05-04 20:48 ` Geert Uytterhoeven
2008-05-09 15:22 ` Jeff Dike
2008-05-17 19:08 ` Rob Landley
2008-05-19 16:12 ` [uml-devel] [PATCH] make quiet suppress parse_chan_pair boot?messages Jeff Dike
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.