15 Star 2 Fork 66

src-openEuler/util-linux

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-dmesg-print-object-closing-brace-while-waiting-for-n.patch 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
zhangyao2022 提交于 2024-11-15 16:22 +08:00 . sync patches from the old version
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/util-linux.git
git@gitee.com:src-openeuler/util-linux.git
src-openeuler
util-linux
util-linux
master

搜索帮助