代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/procps-ng 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From bfb0eadc38e789737dec7f14dd7a7ac00f5f0761 Mon Sep 17 00:00:00 2001
From: Robert Malz <[email protected]>
Date: Thu, 21 Sep 2023 16:45:49 +1000
Subject: [PATCH] uptime: fix output on 60 seconds
When procps_uptime will return 60 seconds uptime -p will not
provide any output except "up". To stay consistent with other
time units the expected output is "up 0 minutes".
References:
#302
Signed-off-by: Craig Small <[email protected]>
---
library/uptime.c | 2 +-
1 files changed, 1 insertions(+), 1 deletion(-)
diff --git a/library/uptime.c b/library/uptime.c
index b41538f5..5faeefca 100644
--- a/library/uptime.c
+++ b/library/uptime.c
@@ -258,7 +258,7 @@ PROCPS_EXPORT char *procps_uptime_sprint_short(void)
comma += 1;
}
- if (upminutes || (!upminutes && uptime_secs < 60)) {
+ if (upminutes || (!upminutes && uptime_secs <= 60)) {
pos += sprintf(shortbuf + pos, "%s%d %s",
comma > 0 ? ", " : "", upminutes,
upminutes != 1 ? "minutes" : "minute");
--
GitLab
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。