Skip to content

Commit

Permalink
use Shared::procPath, fix Logger error type
Browse files Browse the repository at this point in the history
  • Loading branch information
simplepad committed Jun 29, 2022
1 parent 126e89b commit aeea535
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/linux/btop_collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,8 +947,8 @@ namespace Mem {
disks.at(mountpoint).stat = "/sys/block/" + devname + "/stat";
break;
//? Set ZFS stat filepath
} else if (fs::exists("/proc/spl/kstat/zfs/" + devname + "/io", ec) and access(string("/proc/spl/kstat/zfs/" + devname + "/io").c_str(), R_OK) == 0) {
disks.at(mountpoint).stat = "/proc/spl/kstat/zfs/" + devname + "/io";
} else if (fs::exists(Shared::procPath.string() + "/spl/kstat/zfs/" + devname + "/io", ec) and access(string(Shared::procPath.string() + "/spl/kstat/zfs/" + devname + "/io").c_str(), R_OK) == 0) {
disks.at(mountpoint).stat = Shared::procPath.string() + "/spl/kstat/zfs/" + devname + "/io";
break;
}
devname.resize(devname.size() - 1);
Expand Down Expand Up @@ -1079,7 +1079,7 @@ namespace Mem {
while (cmp_greater(disk.io_activity.size(), width * 2)) disk.io_activity.pop_front();
}
} else {
Logger::warning("Error in Mem::collect() : when opening " + (string)disk.stat);
Logger::debug("Error in Mem::collect() : when opening " + (string)disk.stat);
}
diskread.close();
}
Expand Down

0 comments on commit aeea535

Please sign in to comment.