代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/systemd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From b90f935f8d2268522480a7c12f7e2213a7a5e19d Mon Sep 17 00:00:00 2001
From: Michal Sekletar <[email protected]>
Date: Fri, 31 May 2019 18:02:20 +0200
Subject: [PATCH] execute: dump CPUAffinity as a range string instead of a list
of CPUs
We do this already when printing the property in systemctl so be
consistent and do the same for systemd-analyze dump.
(cherry picked from commit e7fca352ba43988682a927de6b1f629b3f10a415)
Related: #1734787
---
src/core/execute.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/core/execute.c b/src/core/execute.c
index 22e5825905..bc26aa66e7 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -4098,11 +4098,10 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
}
if (c->cpu_set.set) {
- fprintf(f, "%sCPUAffinity:", prefix);
- for (i = 0; i < c->cpu_set.allocated * 8; i++)
- if (CPU_ISSET_S(i, c->cpu_set.allocated, c->cpu_set.set))
- fprintf(f, " %u", i);
- fputs("\n", f);
+ _cleanup_free_ char *affinity = NULL;
+
+ affinity = cpu_set_to_range_string(&c->cpu_set);
+ fprintf(f, "%sCPUAffinity: %s\n", prefix, affinity);
}
if (c->timer_slack_nsec != NSEC_INFINITY)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。