summaryrefslogtreecommitdiff
path: root/w.c
diff options
context:
space:
mode:
authorCraig Small <csmall@enc.com.au>2015-06-21 18:20:04 +1000
committerCraig Small <csmall@enc.com.au>2015-06-26 22:37:28 +1000
commitd7932b9a130f3b9734a273d551c15a6acc9c7d8a (patch)
treeb60b42a079e64f2cfd2721ff49e0a79e2b3523d9 /w.c
parenta20e88e4e72067c1138721c6e15e2d1130bc9595 (diff)
downloadprocps-ng-d7932b9a130f3b9734a273d551c15a6acc9c7d8a.tar.gz
library: uptime API changes
Removed the printf_uptime, binaries can do printf easily enough. sprint_uptime split into two as there wasn't a lot of common code sprint_uptime(): old style uptime line sprint_uptime_short(): short new style "uptime -p" Hertz_hack needed this, no sane system uses the code (I think) so just assume 100 like we do in FreeBSD.
Diffstat (limited to 'w.c')
-rw-r--r--w.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/w.c b/w.c
index 4c8a619..7870b81 100644
--- a/w.c
+++ b/w.c
@@ -32,7 +32,7 @@
#include "proc/readproc.h"
#include "proc/sysinfo.h"
#include "proc/version.h"
-#include "proc/whattime.h"
+#include <proc/uptime.h>
#include <ctype.h>
#include <errno.h>
@@ -584,7 +584,7 @@ int main(int argc, char **argv)
if (header) {
/* print uptime and headers */
- print_uptime(0);
+ printf("%s\n", sprint_uptime());
/* Translation Hint: Following five uppercase messages are
* headers. Try to keep alignment intact. */
printf(_("%-*s TTY "), userlen, _("USER"));