enh: exit early when no filesystems found

This commit is contained in:
Stéphane Lesimple 2022-01-06 19:30:43 +01:00
parent 45a90860a1
commit 74004e01b9

View File

@ -542,6 +542,11 @@ foreach (@{$cmd->{stdout}}) {
} ## end foreach (@{$cmd->{stdout}})
debug("FILESYSTEMS HASH DUMP 1:", Dumper \%filesystems);
if (!%filesystems) {
print "No btrfs filesystem found.\n";
exit 0;
}
# now look for the mountpoints
my %dev2mp;