From ea2aa869bbde5bca27d517c53639b96d6358f70a Mon Sep 17 00:00:00 2001 From: MK13 Date: Mon, 4 Jan 2021 23:02:33 +0100 Subject: [PATCH] Add procps-ng patch --- .../short_format.patch/short_format.patch | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 procps-ng/short_format.patch/short_format.patch diff --git a/procps-ng/short_format.patch/short_format.patch b/procps-ng/short_format.patch/short_format.patch new file mode 100644 index 0000000..c299b10 --- /dev/null +++ b/procps-ng/short_format.patch/short_format.patch @@ -0,0 +1,56 @@ +--- a/proc/whattime.c 2019-10-27 12:32:58.347231010 +0100 ++++ b/proc/whattime.c 2021-01-04 22:54:30.997747773 +0100 +@@ -76,8 +76,8 @@ + else + updays = (int) uptime_secs / (60*60*24); + +- strcat (buf, "up "); +- pos += 3; ++ //strcat (buf, "up "); ++ //pos += 3; + + if (!human_readable) { + if (updays) +@@ -124,32 +124,32 @@ + } + + if (upyears) { +- pos += sprintf(buf + pos, "%s%d %s", comma > 0 ? ", " : "", upyears, +- upyears > 1 ? "years" : "year"); ++ pos += sprintf(buf + pos, "%s%d%s", comma > 0 ? ", " : "", upyears, ++ upyears > 1 ? "y" : "y"); + comma += 1; + } + + if (upweeks) { +- pos += sprintf(buf + pos, "%s%d %s", comma > 0 ? ", " : "", upweeks, +- upweeks > 1 ? "weeks" : "week"); ++ pos += sprintf(buf + pos, "%s%d%s", comma > 0 ? ", " : "", upweeks, ++ upweeks > 1 ? "w" : "w"); + comma += 1; + } + + if (updays) { +- pos += sprintf(buf + pos, "%s%d %s", comma > 0 ? ", " : "", updays, +- updays > 1 ? "days" : "day"); ++ pos += sprintf(buf + pos, "%s%d%s", comma > 0 ? ", " : "", updays, ++ updays > 1 ? "d" : "d"); + comma += 1; + } + + if (uphours) { +- pos += sprintf(buf + pos, "%s%d %s", comma > 0 ? ", " : "", uphours, +- uphours > 1 ? "hours" : "hour"); ++ pos += sprintf(buf + pos, "%s%d%s", comma > 0 ? ", " : "", uphours, ++ uphours > 1 ? "h" : "h"); + comma += 1; + } + + if (upminutes || (!upminutes && uptime_secs < 60)) { +- pos += sprintf(buf + pos, "%s%d %s", comma > 0 ? ", " : "", upminutes, +- upminutes != 1 ? "minutes" : "minute"); ++ pos += sprintf(buf + pos, "%s%d%s", comma > 0 ? ", " : "", upminutes, ++ upminutes != 1 ? "m" : "m"); + comma += 1; + } + }