Skip to content
Snippets Groups Projects
Commit 70fa1f16 authored by Mark Harrison's avatar Mark Harrison
Browse files

Add some more error checking to the ZpoolFree module

git-svn-id: https://labs.omniti.com/resmon/branches/resmon2@337 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
parent 5728f168
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,8 @@ sub handler {
foreach my $line (split /\n/, $output) {
my ($name, $used, $uunit, $free, $funit) = $line =~
/(\S+)\s+([0-9.]+)([BKMGTPEZ]?)\s+([0-9.]+)([BKMGTPEZ]?)/;
# Make sure we were able to match the regex
die "Unable to parse zfs command output: $line\n" unless defined($name);
next if ($name =~ /\//); # We're only interested in the root of a pool
# Convert human readable units to bytes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment