blob: 67cdbd5a508e147ad5f7559552b244d6cca4f675 [file] [log] [blame]
---
kernel/printk.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -462,8 +462,11 @@ static ssize_t devkmsg_read(struct file
msg = log_from_idx(user->idx);
ts_usec = msg->ts_nsec;
do_div(ts_usec, 1000);
- len = sprintf(user->buf, "%u,%llu,%llu;",
- (msg->facility << 3) | msg->level, user->seq, ts_usec);
+ len = sprintf(user->buf, "%u,%llu,%llu,%s%s%s;",
+ (msg->facility << 3) | msg->level, user->seq, ts_usec,
+ msg->flags & LOG_PREFIX ? "p" : "",
+ msg->flags & LOG_NEWLINE ? "n" : "",
+ msg->flags & LOG_CONT ? "c" : "");
/* escape non-printable characters */
for (i = 0; i < msg->text_len; i++) {