代码拉取完成,页面将自动刷新
From 5740148a20be4ac84884c342199d90553c90f04d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
Date: Sun, 10 Mar 2024 10:43:20 +0100
Subject: [PATCH] dmesg: print object closing brace while waiting for next
message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Allow incremental parsers to process the full object as it is written by
dmesg.
Closes #2833
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Reference:https://github.com/util-linux/util-linux/commit/5740148a20be4ac84884c342199d90553c90f04d
Conflict:NA
---
sys-utils/dmesg.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index 25c674be..e73cddf5 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -1344,10 +1344,13 @@ full_output:
done:
free(mesg_copy);
- if (ctl->json)
+ if (ctl->json) {
ul_jsonwrt_object_close(&ctl->jfmt);
- else
+ if (ctl->follow)
+ ul_jsonwrt_flush(&ctl->jfmt);
+ } else {
putchar('\n');
+ }
}
/*
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。