diff options
| author | shevabam <shevabam@gmail.com> | 2018-09-02 18:47:03 +0200 |
|---|---|---|
| committer | shevabam <shevabam@gmail.com> | 2018-09-02 18:47:03 +0200 |
| commit | 16410f396a388de550b90cf7a0f7b2aa27a3fed5 (patch) | |
| tree | 92556dd57ee9c03bab6f405480cd9b7a714c6d65 | |
| parent | 4e8eb68ed7bf2c64175d3a7315d8e3ee17479801 (diff) | |
Adds option to ignore /dev/loopX via config file #60
| -rw-r--r-- | conf/esm.config.json | 1 | ||||
| -rw-r--r-- | libs/disk.php | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/conf/esm.config.json b/conf/esm.config.json index e40b3ea..2947c82 100644 --- a/conf/esm.config.json +++ b/conf/esm.config.json @@ -12,6 +12,7 @@ }, "disk": { "show_tmpfs": false, + "show_loop": false, "show_filesystem": true, "ignore_mounts": [] }, diff --git a/libs/disk.php b/libs/disk.php index d0be8b7..314e1af 100644 --- a/libs/disk.php +++ b/libs/disk.php @@ -32,6 +32,9 @@ else if (strpos($type, 'tmpfs') !== false && $Config->get('disk:show_tmpfs') === false) continue; + if (strpos($filesystem, '/dev/loop') !== false && $Config->get('disk:show_loop') === false) + continue; + foreach ($Config->get('disk:ignore_mounts') as $to_ignore) { if ($mount === $to_ignore) |
