chiark / gitweb /
missing.h: Define IFA_F_NOPREFIXROUTE
[elogind.git] / src / shared / machine-image.c
index f166e9410d0f1385cdad959a92a92cb8687c2e3c..0b41860b5d820b5f0240c5087763da7b56fcf09b 100644 (file)
@@ -358,7 +358,7 @@ int image_remove(Image *i) {
         switch (i->type) {
 
         case IMAGE_SUBVOLUME:
-                return btrfs_subvol_remove(i->path);
+                return btrfs_subvol_remove(i->path, true);
 
         case IMAGE_DIRECTORY:
                 /* Allow deletion of read-only directories */
@@ -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: