Commit 84ddaa8c authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: Change printf to printk in console driver

From: Al Viro - we have error messages with KERN_ERR in them, so they
should be printk-ed rather than printf-ed.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 12f49643
...@@ -20,9 +20,17 @@ ...@@ -20,9 +20,17 @@
#include "os.h" #include "os.h"
#ifdef CONFIG_NOCONFIG_CHAN #ifdef CONFIG_NOCONFIG_CHAN
/* The printk's here are wrong because we are complaining that there is no
* output device, but printk is printing to that output device. The user will
* never see the error. printf would be better, except it can't run on a
* kernel stack because it will overflow it.
* Use printk for now since that will avoid crashing.
*/
static void *not_configged_init(char *str, int device, struct chan_opts *opts) static void *not_configged_init(char *str, int device, struct chan_opts *opts)
{ {
printf(KERN_ERR "Using a channel type which is configured out of " printk(KERN_ERR "Using a channel type which is configured out of "
"UML\n"); "UML\n");
return(NULL); return(NULL);
} }
...@@ -30,27 +38,27 @@ static void *not_configged_init(char *str, int device, struct chan_opts *opts) ...@@ -30,27 +38,27 @@ static void *not_configged_init(char *str, int device, struct chan_opts *opts)
static int not_configged_open(int input, int output, int primary, void *data, static int not_configged_open(int input, int output, int primary, void *data,
char **dev_out) char **dev_out)
{ {
printf(KERN_ERR "Using a channel type which is configured out of " printk(KERN_ERR "Using a channel type which is configured out of "
"UML\n"); "UML\n");
return(-ENODEV); return(-ENODEV);
} }
static void not_configged_close(int fd, void *data) static void not_configged_close(int fd, void *data)
{ {
printf(KERN_ERR "Using a channel type which is configured out of " printk(KERN_ERR "Using a channel type which is configured out of "
"UML\n"); "UML\n");
} }
static int not_configged_read(int fd, char *c_out, void *data) static int not_configged_read(int fd, char *c_out, void *data)
{ {
printf(KERN_ERR "Using a channel type which is configured out of " printk(KERN_ERR "Using a channel type which is configured out of "
"UML\n"); "UML\n");
return(-EIO); return(-EIO);
} }
static int not_configged_write(int fd, const char *buf, int len, void *data) static int not_configged_write(int fd, const char *buf, int len, void *data)
{ {
printf(KERN_ERR "Using a channel type which is configured out of " printk(KERN_ERR "Using a channel type which is configured out of "
"UML\n"); "UML\n");
return(-EIO); return(-EIO);
} }
...@@ -58,7 +66,7 @@ static int not_configged_write(int fd, const char *buf, int len, void *data) ...@@ -58,7 +66,7 @@ static int not_configged_write(int fd, const char *buf, int len, void *data)
static int not_configged_console_write(int fd, const char *buf, int len, static int not_configged_console_write(int fd, const char *buf, int len,
void *data) void *data)
{ {
printf(KERN_ERR "Using a channel type which is configured out of " printk(KERN_ERR "Using a channel type which is configured out of "
"UML\n"); "UML\n");
return(-EIO); return(-EIO);
} }
...@@ -66,7 +74,7 @@ static int not_configged_console_write(int fd, const char *buf, int len, ...@@ -66,7 +74,7 @@ static int not_configged_console_write(int fd, const char *buf, int len,
static int not_configged_window_size(int fd, void *data, unsigned short *rows, static int not_configged_window_size(int fd, void *data, unsigned short *rows,
unsigned short *cols) unsigned short *cols)
{ {
printf(KERN_ERR "Using a channel type which is configured out of " printk(KERN_ERR "Using a channel type which is configured out of "
"UML\n"); "UML\n");
return(-ENODEV); return(-ENODEV);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment