Function which calls the btrfs binary and returns an array of it's
output.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
return @output;
}
+#
+## Function which simply calls subvolume list of the btrfs tool and returns it's output
+## as array.
+#
+sub btrfs_subvolume_list ($) {
+ my ($volume, $type) = @_;
+
+ # Defaults to "/" if no volume detail has been given.
+ $volume //= "/";
+
+ # Call the btrfs binary to get the known subvolumes of the given volume.
+ my @output = &General::system_output("$btrfs_bin", "subvolume", "list", "$volume");
+
+ # Return the grabbed output.
+ return @output;
+}
+
1;