diff options
author | Kay Sievers <kay@vrfy.org> | 2012-07-15 03:04:23 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-07-15 03:04:23 +0200 |
commit | a4829f4da141ed86676ef2723bf8a57b79d43770 (patch) | |
tree | e6bf8759e2733bceb1c94c509f2ec6b73af7dd37 | |
parent | f975bf9f9741e162ce6020b3b79c51228584f95f (diff) | |
download | patches-a4829f4da141ed86676ef2723bf8a57b79d43770.tar.gz |
update 03-kmsg-cont-order.patch
-rw-r--r-- | 03-kmsg-cont-order.patch | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/03-kmsg-cont-order.patch b/03-kmsg-cont-order.patch index 38e5f56..b53c6fb 100644 --- a/03-kmsg-cont-order.patch +++ b/03-kmsg-cont-order.patch @@ -19,8 +19,8 @@ each other, or we receive over-long continuation lines we need to flush. Signed-off-by: Kay Sievers <kay@vrfy.org> --- - kernel/printk.c | 89 ++++++++++++++++++++++++++++++++++++++++---------------- - 1 file changed, 64 insertions(+), 25 deletions(-) + kernel/printk.c | 93 ++++++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 68 insertions(+), 25 deletions(-) --- a/kernel/printk.c +++ b/kernel/printk.c @@ -74,7 +74,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> } static bool cont_add(int facility, int level, const char *text, size_t len) -@@ -1418,6 +1439,7 @@ static bool cont_add(int facility, int l +@@ -1418,12 +1439,17 @@ static bool cont_add(int facility, int l cont.level = level; cont.owner = current; cont.ts_nsec = local_clock(); @@ -82,7 +82,17 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> cont.cons = 0; cont.flushed = false; } -@@ -1432,7 +1454,7 @@ static size_t cont_print_text(char *text + + memcpy(cont.buf + cont.len, text, len); + cont.len += len; ++ ++ if (cont.len > (sizeof(cont.buf) * 80) / 100) ++ cont_flush(LOG_CONT); ++ + return true; + } + +@@ -1432,7 +1458,7 @@ static size_t cont_print_text(char *text size_t textlen = 0; size_t len; @@ -91,7 +101,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> textlen += print_time(cont.ts_nsec, text); size -= textlen; } -@@ -1447,7 +1469,8 @@ static size_t cont_print_text(char *text +@@ -1447,7 +1473,8 @@ static size_t cont_print_text(char *text } if (cont.flushed) { @@ -101,7 +111,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> /* got everything, release buffer */ cont.len = 0; } -@@ -1545,7 +1568,7 @@ asmlinkage int vprintk_emit(int facility +@@ -1545,7 +1572,7 @@ asmlinkage int vprintk_emit(int facility * or another task also prints continuation lines. */ if (cont.len && (lflags & LOG_PREFIX || cont.owner != current)) @@ -110,7 +120,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> /* buffer line if possible, otherwise store it right away */ if (!cont_add(facility, level, text, text_len)) -@@ -1563,7 +1586,7 @@ asmlinkage int vprintk_emit(int facility +@@ -1563,7 +1590,7 @@ asmlinkage int vprintk_emit(int facility if (cont.len && cont.owner == current) { if (!(lflags & LOG_PREFIX)) stored = cont_add(facility, level, text, text_len); @@ -119,7 +129,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> } if (!stored) -@@ -1661,10 +1684,13 @@ EXPORT_SYMBOL(printk); +@@ -1661,10 +1688,13 @@ EXPORT_SYMBOL(printk); #define LOG_LINE_MAX 0 static u64 syslog_seq; static u32 syslog_idx; @@ -133,7 +143,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> static struct cont { size_t len; size_t cons; -@@ -1948,10 +1974,34 @@ void wake_up_klogd(void) +@@ -1948,10 +1978,34 @@ void wake_up_klogd(void) this_cpu_or(printk_pending, PRINTK_PENDING_WAKEUP); } @@ -172,7 +182,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> /** * console_unlock - unlock the console system -@@ -1983,19 +2033,7 @@ void console_unlock(void) +@@ -1983,19 +2037,7 @@ void console_unlock(void) console_may_schedule = 0; /* flush buffered message fragment immediately to console */ @@ -193,7 +203,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> again: for (;;) { struct log *msg; -@@ -2032,6 +2070,7 @@ skip: +@@ -2032,6 +2074,7 @@ skip: * will properly dump everything later. */ msg->flags &= ~LOG_NOCONS; |