Skip to content

printk: Fix message continuation breakage involved with structured printk

Yoshihiro YUNOMAE lkml 1 version In review

Get series with b4
b4 am 20131220094134.24233.2969.stgit@yunodevel

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2printk: Add dictionary information in structure contkernel/printk/printk.c+47 -231 reply
2/2printk: Delete LOG_NEWLINE flag for structured printkkernel/printk/printk.c+17 -211 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] [BUGFIX] printk: Fix message continuation breakage involved with structured printk

Hi,

This patch set fixes message continuation breakage involved with structured printk. A SCSI driver may output two continuation error messages like

    scmd_printk("foo");
    printf("bar\n");
Here, scmd_printk() is structured printk with key/value dictionary information.
Structured printk became to forcibly start a new line from commit c313af14, so
those SCSI continuation error messages are divided as follows:
    [1234.567890] sd 2:0:0:0: [sdb] foo
    [1234.567893] bar                    <---- Divided
However, the SCSI driver may expect following continuation error messages:
    [1234.567893] sd 2:0:0:0: [sdb] foo bar

When user tools handle the error messages, that divided message will create some inconveniences.

This patch set makes structured printk with dictionary information not start a new line. Moreover, when multiple structured printk messages are continued, this patch outputs those multiple dictionary information when we read /dev/kmsg.

Thanks!

---

Yoshihiro YUNOMAE (2):
printk: Add dictionary information in structure cont
printk: Delete LOG_NEWLINE flag for structured printk

 kernel/printk/printk.c |   70 +++++++++++++++++++++++++++++++-----------------
 1 file changed, 45 insertions(+), 25 deletions(-)
Signature · 4 lines
Yoshihiro YUNOMAE
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: [email protected]