Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
| inline |
side by side
include <sys/time.h> before <sys/sensors.h> for time struct timeval
[slstatus.git]
/
components
/
disk.c
diff --git
a/components/disk.c
b/components/disk.c
index
a225421
..
8112981
100644
(file)
--- a/
components/disk.c
+++ b/
components/disk.c
@@
-30,8
+30,8
@@
disk_perc(const char *mnt)
return NULL;
}
- return bprintf("%d", 100 *
-
(1.0f - ((float)fs.f_bfree / (float)fs.f_blocks
)));
+ return bprintf("%d",
(int)(
100 *
+
(1.0f - ((float)fs.f_bfree / (float)fs.f_blocks)
)));
}
const char *