From 617a4d0f7007499a6d9d06aa4dafd34f55890fc1 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Mon, 7 Sep 2015 18:38:39 +1000 Subject: [PATCH] library: Add space after days for uptime Uptime output for both w and uptime command were showing no comma or space after days. $ ./uptime 18:32:21 up 22 days7 min, 6 users, load average: 0.23, 0.46, 0.64 Minor tweak to fix this. --- proc/uptime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proc/uptime.c b/proc/uptime.c index ca571b9d..e6412052 100644 --- a/proc/uptime.c +++ b/proc/uptime.c @@ -125,7 +125,7 @@ PROCPS_EXPORT char *procps_uptime_sprint(void) realtime->tm_hour, realtime->tm_min, realtime->tm_sec); if (updays) - pos += sprintf(upbuf + pos, "%d %s", updays, (updays > 1) ? "days" : "day"); + pos += sprintf(upbuf + pos, "%d %s, ", updays, (updays > 1) ? "days" : "day"); if (uphours) pos += sprintf(upbuf + pos, "%2d:%02d, ", uphours, upminutes);