summaryrefslogtreecommitdiffstats
path: root/web/attachments/353739-bignumbers.patch
blob: e8730535149de681906e7fc8f0328bee57f80e97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
diff --git a/plugins/utils.c b/plugins/utils.c
index fee06cf..df8c979 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -535,39 +535,39 @@ strpcat (char *dest, const char *src, const char *str)
  ******************************************************************************/
 
 char *perfdata (const char *label,
- long int val,
+ long long int val,
  const char *uom,
  int warnp,
- long int warn,
+ long long int warn,
  int critp,
- long int crit,
+ long long int crit,
  int minp,
- long int minv,
+ long long int minv,
  int maxp,
- long int maxv)
+ long long int maxv)
 {
 	char *data = NULL;
 
 	if (strpbrk (label, "'= "))
-		asprintf (&data, "'%s'=%ld%s;", label, val, uom);
+		asprintf (&data, "'%s'=%lli%s;", label, val, uom);
 	else
-		asprintf (&data, "%s=%ld%s;", label, val, uom);
+		asprintf (&data, "%s=%lli%s;", label, val, uom);
 
 	if (warnp)
-		asprintf (&data, "%s%ld;", data, warn);
+		asprintf (&data, "%s%lli;", data, warn);
 	else
 		asprintf (&data, "%s;", data);
 
 	if (critp)
-		asprintf (&data, "%s%ld;", data, crit);
+		asprintf (&data, "%s%lli;", data, crit);
 	else
 		asprintf (&data, "%s;", data);
 
 	if (minp)
-		asprintf (&data, "%s%ld", data, minv);
+		asprintf (&data, "%s%lli", data, minv);
 
 	if (maxp)
-		asprintf (&data, "%s;%ld", data, maxv);
+		asprintf (&data, "%s;%lli", data, maxv);
 
 	return data;
 }
diff --git a/plugins/utils.h b/plugins/utils.h
index 116f6c8..8a067fd 100644
--- a/plugins/utils.h
+++ b/plugins/utils.h
@@ -99,16 +99,16 @@ const char *state_text (int);
 #define min(a,b) (((a)<(b))?(a):(b))
 
 char *perfdata (const char *,
- long int,
+ long long int,
  const char *,
  int,
- long int,
+ long long int,
  int,
- long int,
+ long long int,
  int,
- long int,
+ long long int,
  int,
- long int);
+ long long int);
 
 char *fperfdata (const char *,
  double,