From d8d7e408146e6d6525db9a9266f6f3d67e3155bd Mon Sep 17 00:00:00 2001 From: simplepad <35456194+simplepad@users.noreply.github.com> Date: Fri, 1 Jul 2022 18:35:41 +0300 Subject: [PATCH] Add zfs_pools_only option --- src/btop_config.cpp | 3 +++ src/btop_menu.cpp | 7 +++++++ src/linux/btop_collect.cpp | 1 + 3 files changed, 11 insertions(+) diff --git a/src/btop_config.cpp b/src/btop_config.cpp index 6ffc483..6cc2a6c 100644 --- a/src/btop_config.cpp +++ b/src/btop_config.cpp @@ -155,6 +155,8 @@ namespace Config { {"use_fstab", "#* Read disks list from /etc/fstab. This also disables only_physical."}, + {"zfs_pools_only", "#* Only show ZFS pools. Setting this to True will hide all datasets, and only show ZFS pools."}, + {"disk_free_priv", "#* Set to true to show available disk space for privileged users."}, {"show_io_stat", "#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view."}, @@ -241,6 +243,7 @@ namespace Config { {"show_disks", true}, {"only_physical", true}, {"use_fstab", true}, + {"zfs_pools_only", false}, {"show_io_stat", true}, {"io_mode", false}, {"base_10_sizes", false}, diff --git a/src/btop_menu.cpp b/src/btop_menu.cpp index 6dd420c..99972ef 100644 --- a/src/btop_menu.cpp +++ b/src/btop_menu.cpp @@ -469,6 +469,13 @@ namespace Menu { "This also disables only_physical.", "", "True or False."}, + {"zfs_pools_only", + "(Linux) Only show ZFS pools.", + "", + "Setting this to True will hide all datasets,", + "and only show ZFS pools.", + "", + "True or False."}, {"disk_free_priv", "(Linux) Type of available disk space.", "", diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index 0c71397..8350dc2 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -851,6 +851,7 @@ namespace Mem { bool filter_exclude = false; auto& use_fstab = Config::getB("use_fstab"); auto& only_physical = Config::getB("only_physical"); + auto& zfs_pools_only = Config::getB("zfs_pools_only"); auto& disks = mem.disks; ifstream diskread;