View | Details | Raw Unified | Return to bug 72642
Collapse All | Expand All

(-)torsmo/Makefile (+1 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	torsmo
8
PORTNAME=	torsmo
9
PORTVERSION=	0.17
9
PORTVERSION=	0.17
10
PORTREVISION=	1
10
CATEGORIES=	sysutils
11
CATEGORIES=	sysutils
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITE_SUBDIR=	${PORTNAME}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
(-)torsmo/files/freebsd.c (-1 / +1 lines)
Lines 94-100 Link Here
94
	int mib[2] = {CTL_KERN, KERN_BOOTTIME};
94
	int mib[2] = {CTL_KERN, KERN_BOOTTIME};
95
      	struct timeval boottime;
95
      	struct timeval boottime;
96
        time_t now;
96
        time_t now;
97
	int size = sizeof(boottime);
97
	size_t size = sizeof(boottime);
98
	double uptime;
98
	double uptime;
99
99
100
	if((sysctl(mib, 2, &boottime, &size, NULL, 0) != -1) && (boottime.tv_sec != 0)) {
100
	if((sysctl(mib, 2, &boottime, &size, NULL, 0) != -1) && (boottime.tv_sec != 0)) {
(-)torsmo/files/patch-torsmo.c (-3 / +33 lines)
Lines 1-11 Link Here
1
--- torsmo.c.orig	Thu Aug  5 19:39:06 2004
1
--- torsmo.c.orig	Wed Oct 13 17:31:57 2004
2
+++ torsmo.c	Thu Aug  5 19:39:20 2004
2
+++ torsmo.c	Wed Oct 13 17:35:45 2004
3
@@ -376,7 +376,7 @@
4
       snprintf(buf, 255, "%.1fM", m);
5
   }
6
   else if (a >= 1024)
7
-    snprintf(buf, 255, "%Ldk", a/1024L);
8
+    snprintf(buf, 255, "%Ldk", a/1024);
9
   else
10
     snprintf(buf, 255, "%Ld", a);
11
 }
3
@@ -998,7 +998,7 @@
12
@@ -998,7 +998,7 @@
4
     }
13
     }
5
     OBJ(acpitemp) {
14
     OBJ(acpitemp) {
6
       /* does anyone have decimals in acpi temperature? */
15
       /* does anyone have decimals in acpi temperature? */
7
-      snprintf(p, n, "%d", (int) get_acpi_temperature(obj->data.i));
16
-      snprintf(p, n, "%d", (int) get_acpi_temperature(obj->data.i));
8
+      snprintf(p, n, "%0.1f", (int) get_acpi_temperature(obj->data.i));
17
+      snprintf(p, n, "%0.1f", (float)get_acpi_temperature(obj->data.i));
9
     }
18
     }
10
     OBJ(acpifan) {
19
     OBJ(acpifan) {
11
       snprintf(p, n, "%s", get_acpi_fan());
20
       snprintf(p, n, "%s", get_acpi_fan());
21
@@ -2248,8 +2248,8 @@
22
 
23
   /* handle other command line arguments */
24
 
25
-  optind = 0;
26
-
27
+  optind = optreset = 1;
28
+  
29
   while (1) {
30
     int c = getopt(argc, argv, getopt_string);
31
     if(c == -1) break;
32
@@ -2353,8 +2353,7 @@
33
 
34
     default:
35
       fprintf(stderr, "torsmo: forked to background, pid is %d\n", ret);
36
-      exit(0);
37
-      break;
38
+      return 0;
39
     }
40
   }
41

Return to bug 72642