diff options
author | bapt <bapt@FreeBSD.org> | 2011-12-08 22:56:43 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2011-12-08 22:56:43 +0800 |
commit | 7d6be2bb2e6da657aaa0da2acedef800b151ef75 (patch) | |
tree | a0a1688cf10f774569bd407f228b35161cd44593 /x11 | |
parent | f1bf74fa2e430c4c604932448bcf36ae478e7fe9 (diff) | |
download | freebsd-ports-gnome-7d6be2bb2e6da657aaa0da2acedef800b151ef75.tar.gz freebsd-ports-gnome-7d6be2bb2e6da657aaa0da2acedef800b151ef75.tar.zst freebsd-ports-gnome-7d6be2bb2e6da657aaa0da2acedef800b151ef75.zip |
- Fix disk usage
- Use coretemp to get cpu temperature
Feature safe: yes
Diffstat (limited to 'x11')
-rw-r--r-- | x11/i3status/Makefile | 1 | ||||
-rw-r--r-- | x11/i3status/files/patch-include__i3status.h | 12 | ||||
-rw-r--r-- | x11/i3status/files/patch-src__print_disk_info.c | 41 |
3 files changed, 54 insertions, 0 deletions
diff --git a/x11/i3status/Makefile b/x11/i3status/Makefile index 72c9df636f11..842b69a0e3a3 100644 --- a/x11/i3status/Makefile +++ b/x11/i3status/Makefile @@ -7,6 +7,7 @@ PORTNAME= i3status PORTVERSION= 2.3 +PORTREVISION= 1 CATEGORIES= x11 MASTER_SITES= http://i3wm.org/i3status/ diff --git a/x11/i3status/files/patch-include__i3status.h b/x11/i3status/files/patch-include__i3status.h new file mode 100644 index 000000000000..b9d0cc947b8b --- /dev/null +++ b/x11/i3status/files/patch-include__i3status.h @@ -0,0 +1,12 @@ +--- ./include/i3status.h.orig 2011-07-21 23:11:48.000000000 +0200 ++++ ./include/i3status.h 2011-12-08 14:48:47.000000000 +0100 +@@ -16,7 +16,8 @@ + + #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + +-#define THERMAL_ZONE "hw.acpi.thermal.tz%d.temperature" ++/* this needs the coretemp module to be loaded */ ++#define THERMAL_ZONE "dev.cpu.%d.temperature" + #define BATT_LIFE "hw.acpi.battery.life" + #define BATT_TIME "hw.acpi.battery.time" + #define BATT_STATE "hw.acpi.battery.state" diff --git a/x11/i3status/files/patch-src__print_disk_info.c b/x11/i3status/files/patch-src__print_disk_info.c new file mode 100644 index 000000000000..7f8a04eb9390 --- /dev/null +++ b/x11/i3status/files/patch-src__print_disk_info.c @@ -0,0 +1,41 @@ +--- ./src/print_disk_info.c.orig 2011-07-21 23:11:48.000000000 +0200 ++++ ./src/print_disk_info.c 2011-12-08 15:47:21.000000000 +0100 +@@ -6,6 +6,11 @@ + #include <stdint.h> + #include <sys/statvfs.h> + #include <sys/types.h> ++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#include <sys/param.h> ++#include <sys/mount.h> ++#endif ++ + + #include "i3status.h" + +@@ -39,10 +44,18 @@ + */ + void print_disk_info(const char *path, const char *format) { + const char *walk; ++ ++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++ struct statfs buf; ++ ++ if (statfs(path, &buf) == -1) ++ return; ++#else + struct statvfs buf; + + if (statvfs(path, &buf) == -1) + return; ++#endif + + for (walk = format; *walk != '\0'; walk++) { + if (*walk != '%') { +@@ -63,6 +76,7 @@ + if (BEGINS_WITH(walk+1, "total")) { + print_bytes_human((uint64_t)buf.f_bsize * (uint64_t)buf.f_blocks); + walk += strlen("total"); ++ + } + + if (BEGINS_WITH(walk+1, "avail")) { |