From 2b18c6952dad149386b83abe7173ce661a41ea02 Mon Sep 17 00:00:00 2001 From: simplepad <35456194+simplepad@users.noreply.github.com> Date: Wed, 21 Dec 2022 21:43:20 +0300 Subject: [PATCH] fix zfs on freebsd not reporting IO --- src/freebsd/btop_collect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freebsd/btop_collect.cpp b/src/freebsd/btop_collect.cpp index 613e996..2b92ba3 100644 --- a/src/freebsd/btop_collect.cpp +++ b/src/freebsd/btop_collect.cpp @@ -583,8 +583,8 @@ namespace Mem { if (f()) { char buf[512]; size_t len = 512; + uint64_t nread = 0, nwritten = 0; while (not std::feof(f())) { - uint64_t nread = 0, nwritten = 0; if (fgets(buf, len, f())) { char *name = std::strtok(buf, ": \n"); char *value = std::strtok(NULL, ": \n");