aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorculot <culot@FreeBSD.org>2011-05-05 20:32:59 +0800
committerculot <culot@FreeBSD.org>2011-05-05 20:32:59 +0800
commit1b506b2f70a2fcba968f4ff1b091b19b93b40496 (patch)
tree9aff40862b5ce7bcae4387cc815c841c1e94650a /sysutils
parentbc2b9c023acd7e6253d511e152ef1674875c5f05 (diff)
downloadfreebsd-ports-gnome-1b506b2f70a2fcba968f4ff1b091b19b93b40496.tar.gz
freebsd-ports-gnome-1b506b2f70a2fcba968f4ff1b091b19b93b40496.tar.zst
freebsd-ports-gnome-1b506b2f70a2fcba968f4ff1b091b19b93b40496.zip
- Fix error in uptime calculation
PR: ports/156825 Submitted by: Rob Farmer <rfarmer@predatorlabs.net> (maintainer)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/uptimed/Makefile1
-rw-r--r--sysutils/uptimed/files/patch-src__uprecords.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/sysutils/uptimed/Makefile b/sysutils/uptimed/Makefile
index 16fd3b8ea305..c864315cd8aa 100644
--- a/sysutils/uptimed/Makefile
+++ b/sysutils/uptimed/Makefile
@@ -6,6 +6,7 @@
PORTNAME= uptimed
PORTVERSION= 0.3.16
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://podgorny.cz/uptimed/releases/ \
http://www.predatorlabs.net/dl/
diff --git a/sysutils/uptimed/files/patch-src__uprecords.c b/sysutils/uptimed/files/patch-src__uprecords.c
new file mode 100644
index 000000000000..d3bb2b12ef61
--- /dev/null
+++ b/sysutils/uptimed/files/patch-src__uprecords.c
@@ -0,0 +1,12 @@
+--- ./src/uprecords.c.orig 2009-01-01 15:46:00.000000000 -0800
++++ ./src/uprecords.c 2011-05-04 23:56:53.000000000 -0700
+@@ -236,6 +236,9 @@
+ totalutime += u->utime;
+ }
+
++ /* Prevents the downtime from showing as -x days, and the uptime as >100% */
++ totaldtime = -totaldtime;
++
+ print_entry(totalutime, "since", since, "up", 0, 0);
+ print_entry(totaldtime, "since", since, "down", 0, 0);
+