PD#154008: the log output is in disorder
The defination for a continues line in printk is much more strict
from 3.14 to 4.9:
in kernel 3.14, if the first fragment does not end with CR, and the
next fragment does not start with LOG_PREFIX(KERN_ALERT, KERN_ERR and
so on), then they are in a continues line
eg. pr_err("foo "); printk("bar\n")
or pr_err("foo "); pr_cont("bar\n"); both are printing a continues
line
in kernel 4.9, if only the first fragment does not end with CR, and the
next fragment start with LOG_CONT, then they are in a continues line
eg. pr_err("foo "); printk("bar\n"); are not printing a continues line
and pr_err("foo "); pr_cont("bar\n"); are printing a continues line
but in the code path of crash info dumping in kernel 4.9.y, not all of
the continues line printing has been switched to the 4.9 way(aka.
calling pr_cont). Only in kernel 4.13.y all of that has been updated.
so in this commit, we lose the definition of continues line back to
3.14 way to sovle current issue, and need to revert it when we sync
with upstream kernel 4.13.y
Change-Id: I64403d3a18531ceb832b41d96dff4b79a6d7fb5a
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
return textlen;
}
+#define AML_LOSE_CONTLINE_DEF 1
+
static size_t log_output(int facility, int level, enum log_flags lflags, const char *dict, size_t dictlen, char *text, size_t text_len)
{
/*
* write from the same process, try to add it to the buffer.
*/
if (cont.len) {
+#if (AML_LOSE_CONTLINE_DEF == 1)
+ if (cont.owner == current && !(lflags & LOG_PREFIX)) {
+#else
if (cont.owner == current && (lflags & LOG_CONT)) {
+#endif
if (cont_add(facility, level, lflags, text, text_len))
return text_len;
}