This function can be used to very easily create a snapshot.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
return %subvolumes;
}
+#
+## Easy to use function to create a new snapshot with a given name.
+#
+sub btrfs_create_snapshot ($) {
+ my ($name) = @_;
+
+ # Call the btrfs_subvolume_snapshot function and pass the name.
+ my $ret = &btrfs_subvolume_snapshot($name);
+
+ # Return the return code if there was one.
+ return $ret if($ret);
+
+ # Return nothing on success.
+ return;
+}
+
#
## Private function to filter the output of btrfs_subvolume_list command.
##