aboutsummaryrefslogtreecommitdiff
path: root/sysutils/torsmo/files
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2004-10-13 15:02:22 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2004-10-13 15:02:22 +0000
commitfa0fb40327715bb367eeaa669a966baad5a2e516 (patch)
tree963865d285009233bc1fa88abfe42a1312453dfc /sysutils/torsmo/files
parent331475e0359ff5accd15f8c2a47b979e475b22a0 (diff)
downloadports-fa0fb40327715bb367eeaa669a966baad5a2e516.tar.gz
ports-fa0fb40327715bb367eeaa669a966baad5a2e516.zip
Notes
Diffstat (limited to 'sysutils/torsmo/files')
-rw-r--r--sysutils/torsmo/files/freebsd.c2
-rw-r--r--sysutils/torsmo/files/patch-torsmo.c36
2 files changed, 34 insertions, 4 deletions
diff --git a/sysutils/torsmo/files/freebsd.c b/sysutils/torsmo/files/freebsd.c
index 5ad54e486bc5..cd5e9b00d8c2 100644
--- a/sysutils/torsmo/files/freebsd.c
+++ b/sysutils/torsmo/files/freebsd.c
@@ -94,7 +94,7 @@ double get_uptime()
int mib[2] = {CTL_KERN, KERN_BOOTTIME};
struct timeval boottime;
time_t now;
- int size = sizeof(boottime);
+ size_t size = sizeof(boottime);
double uptime;
if((sysctl(mib, 2, &boottime, &size, NULL, 0) != -1) && (boottime.tv_sec != 0)) {
diff --git a/sysutils/torsmo/files/patch-torsmo.c b/sysutils/torsmo/files/patch-torsmo.c
index c32c6aa662a3..2d041d13a02f 100644
--- a/sysutils/torsmo/files/patch-torsmo.c
+++ b/sysutils/torsmo/files/patch-torsmo.c
@@ -1,11 +1,41 @@
---- torsmo.c.orig Thu Aug 5 19:39:06 2004
-+++ torsmo.c Thu Aug 5 19:39:20 2004
+--- torsmo.c.orig Wed Oct 13 17:31:57 2004
++++ torsmo.c Wed Oct 13 17:35:45 2004
+@@ -376,7 +376,7 @@
+ snprintf(buf, 255, "%.1fM", m);
+ }
+ else if (a >= 1024)
+- snprintf(buf, 255, "%Ldk", a/1024L);
++ snprintf(buf, 255, "%Ldk", a/1024);
+ else
+ snprintf(buf, 255, "%Ld", a);
+ }
@@ -998,7 +998,7 @@
}
OBJ(acpitemp) {
/* does anyone have decimals in acpi temperature? */
- snprintf(p, n, "%d", (int) get_acpi_temperature(obj->data.i));
-+ snprintf(p, n, "%0.1f", (int) get_acpi_temperature(obj->data.i));
++ snprintf(p, n, "%0.1f", (float)get_acpi_temperature(obj->data.i));
}
OBJ(acpifan) {
snprintf(p, n, "%s", get_acpi_fan());
+@@ -2248,8 +2248,8 @@
+
+ /* handle other command line arguments */
+
+- optind = 0;
+-
++ optind = optreset = 1;
++
+ while (1) {
+ int c = getopt(argc, argv, getopt_string);
+ if(c == -1) break;
+@@ -2353,8 +2353,7 @@
+
+ default:
+ fprintf(stderr, "torsmo: forked to background, pid is %d\n", ret);
+- exit(0);
+- break;
++ return 0;
+ }
+ }
+