Projects
Mega:24.03
procps-ng
_service:tar_scm:backport-uptime-fix-output-on-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-uptime-fix-output-on-60-seconds.patch of Package procps-ng
From bfb0eadc38e789737dec7f14dd7a7ac00f5f0761 Mon Sep 17 00:00:00 2001 From: Robert Malz <mail.robert.malz@gmail.com> 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 <csmall@dropbear.xyz> --- 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
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2