代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/systemd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 02b72c15a53f694f65a377206fba478db91432cd Mon Sep 17 00:00:00 2001
From: Lennart Poettering <[email protected]>
Date: Tue, 6 Nov 2018 18:37:21 +0100
Subject: [PATCH] format-table: before outputting a color, check if colors are
available
This is in many cases redundant, as a similar check is done by various
callers already, but in other cases (where we read the color from a
static table for example), it's nice to let the color check be done by
the table code itself, and since it doesn't hurt in the other cases just
do it again.
(cherry picked from commit a22318e55492af721879d8692ed039144696bb08)
Related: #1689832
---
src/basic/format-table.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/basic/format-table.c b/src/basic/format-table.c
index ac5d66eda2..17be7285cd 100644
--- a/src/basic/format-table.c
+++ b/src/basic/format-table.c
@@ -1255,13 +1255,13 @@ int table_print(Table *t, FILE *f) {
if (j > 0)
fputc(' ', f); /* column separator */
- if (d->color)
+ if (d->color && colors_enabled())
fputs(d->color, f);
fputs(field, f);
- if (d->color)
- fputs(ansi_normal(), f);
+ if (d->color && colors_enabled())
+ fputs(ANSI_NORMAL, f);
}
fputc('\n', f);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。