diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-04-16 11:58:47 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-04-16 11:58:47 +0200 |
commit | 392b62b30a0fe8cfdd6a75b46fb13ac8a7fc8ed9 (patch) | |
tree | 97b6d5a044f4f637d5752b76b5429c5b9b637d77 /bin | |
parent | 7b8795f231fe069892a92bff73345efd6f4def9e (diff) |
vdf: Add -i <mountpoints to ignore>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/vdf | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -135,7 +135,7 @@ sub show_df_png { return; } -getopts('Aa:cfg', \%opts); +getopts('Aa:cfgi:', \%opts); $alpha = $opts{'a'} // 0; open(my $mounts_fh, '<', '/proc/mounts'); @@ -160,6 +160,10 @@ close($mounts_fh); if (not $opts{'A'}) { @mounts = grep { $_->[0] !~ qr{ ^ ( (root|tmp)fs | none ) $ }x } @mounts; } +if ($opts{'i'}) { + my @ignored = split(qr{,}, $opts{'i'}); + @mounts = grep { not ($_->[1] ~~ [@ignored]) } @mounts; +} if ($opts{'c'}) { show_df_console(); |