[Patch] restore correct print_len calculation in printk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux