patch-2.1.33 linux/kernel/printk.c
Next file: linux/kernel/resource.c
Previous file: linux/kernel/fork.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Tue Apr 8 09:41:34 1997
- Orig file:
v2.1.32/linux/kernel/printk.c
- Orig date:
Mon Apr 7 11:35:32 1997
diff -u --recursive --new-file v2.1.32/linux/kernel/printk.c linux/kernel/printk.c
@@ -176,6 +176,7 @@
va_list args;
int i;
char *msg, *p, *buf_end;
+ int line_feed;
static signed char msg_level = -1;
long flags;
@@ -202,6 +203,7 @@
msg += 3;
msg_level = p[1] - '0';
}
+ line_feed = 0;
for (; p < buf_end; p++) {
log_buf[(log_start+log_size) & (LOG_BUF_LEN-1)] = *p;
if (log_size < LOG_BUF_LEN)
@@ -211,18 +213,20 @@
log_start &= LOG_BUF_LEN-1;
}
logged_chars++;
- if (*p == '\n')
+ if (*p == '\n') {
+ line_feed = 1;
break;
+ }
}
if (msg_level < console_loglevel && console_drivers) {
struct console *c = console_drivers;
while(c) {
if (c->write)
- c->write(msg, p - msg + 1);
+ c->write(msg, p - msg + line_feed);
c = c->next;
}
}
- if (*p == '\n')
+ if (line_feed)
msg_level = -1;
}
__restore_flags(flags);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov