[Patch] restore correct print_len calculation in printk

From: Martin Peschke
Date: Fri Jun 02 2006 - 14:15:30 EST


This fixes the following miscalculation that has been introduced by my
statistics-infrastructure-prerequisite-timestamp.patch:

print_len loses 3 in the 'got log level'-case due to a surplus
substraction. It also loses 3 in the other case due to adding a log
level substring that is not entered in the books.

Signed-off-by: Martin Peschke <mp3@xxxxxxxxxx>
---

printk.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/printk.c 2006-06-01 10:04:45.000000000 +0200
+++ b/kernel/printk.c 2006-06-01 10:08:46.000000000 +0200
@@ -515,9 +515,9 @@
p[1] <= '7' && p[2] == '>') {
loglev_char = p[1];
p += 3;
- printed_len -= 3;
} else {
loglev_char = default_message_loglevel + '0';
+ printed_len += 3;
}
emit_log_char('<');
emit_log_char(loglev_char);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/