| Server IP : 82.208.35.60 / Your IP : 216.73.216.89 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/deskutils/i3status/files/ |
Upload File : |
--- src/print_disk_info.c.orig 2021-11-10 16:46:42 UTC
+++ src/print_disk_info.c
@@ -63,7 +63,7 @@ static int print_bytes_human(char *outwalk, uint64_t b
* Determines whether remaining bytes are below given threshold.
*
*/
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
+#if defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
static bool below_threshold(struct statfs buf, const char *prefix_type, const char *threshold_type, const double low_threshold) {
#else
static bool below_threshold(struct statvfs buf, const char *prefix_type, const char *threshold_type, const double low_threshold) {
@@ -124,17 +124,17 @@ void print_disk_info(disk_info_ctx_t *ctx) {
INSTANCE(ctx->path);
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
+#if defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
struct statfs buf;
if (statfs(path, &buf) == -1)
return;
mounted = true;
-#elif defined(__NetBSD__)
+#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
struct statvfs buf;
- if (statvfs(path, &buf) == -1)
+ if (statvfs(ctx->path, &buf) == -1)
return;
mounted = true;