chiark / gitweb /
util: add shell_maybe_quote() call for preparing a string for shell cmdline inclusion
[elogind.git] / src / shared / machine-image.c
index fb72123f1a80e43b2ee2b38dc66c87c63a089089..0b41860b5d820b5f0240c5087763da7b56fcf09b 100644 (file)
@@ -491,7 +491,7 @@ int image_clone(Image *i, const char *new_name, bool read_only) {
         case IMAGE_DIRECTORY:
                 new_path = strjoina("/var/lib/machines/", new_name);
 
-                r = btrfs_subvol_snapshot(i->path, new_path, read_only, true);
+                r = btrfs_subvol_snapshot(i->path, new_path, (read_only ? BTRFS_SNAPSHOT_READ_ONLY : 0) | BTRFS_SNAPSHOT_FALLBACK_COPY | BTRFS_SNAPSHOT_RECURSIVE);
                 break;
 
         case IMAGE_RAW: