[PATCH] printk: Put back dict lines prefix into /dev/kmsg
From: Petr Mladek
Date: Mon Sep 21 2020 - 05:45:16 EST
Put back prefix for dictionary lines in /dev/kmsg. They have been removed
by the commit XXX ("printk: move dictionary keys to dev_printk_info").
Signed-off-by: Petr Mladek <pmladek@xxxxxxxx>
---
kernel/printk/printk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 77660354a7c5..1fe3d0cb2fe0 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -637,7 +637,8 @@ static ssize_t msg_add_dict_text(char *buf, size_t size,
if (!val_len)
return 0;
- len = msg_add_ext_text(buf, size, key, strlen(key), '=');
+ len = msg_add_ext_text(buf, size, "", 0, ' '); /* dict prefix */
+ len += msg_add_ext_text(buf + len, size - len, key, strlen(key), '=');
len += msg_add_ext_text(buf + len, size - len, val, val_len, '\n');
return len;
--
2.26.2