summaryrefslogtreecommitdiff
path: root/src/import/pull-common.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-06 10:57:17 +0200
committerLennart Poettering <lennart@poettering.net>2015-04-06 11:28:16 +0200
commitd9e2daaf3d8649650cf9784b4fe9d9de4507da0c (patch)
treea6f5960da742e676f249036e59656dac040ecaed /src/import/pull-common.c
parent41d1ed059bbc863c73161f39594de2eb7b338886 (diff)
btrfs: support recursively removing btrfs snapshots
Diffstat (limited to 'src/import/pull-common.c')
-rw-r--r--src/import/pull-common.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/import/pull-common.c b/src/import/pull-common.c
index d4cebe205e..ee0c064dfc 100644
--- a/src/import/pull-common.c
+++ b/src/import/pull-common.c
@@ -124,10 +124,8 @@ int pull_make_local_copy(const char *final, const char *image_root, const char *
p = strjoina(image_root, "/", local);
- if (force_local) {
- (void) btrfs_subvol_remove(p);
- (void) rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL);
- }
+ if (force_local)
+ (void) rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL|REMOVE_SUBVOLUME);
r = btrfs_subvol_snapshot(final, p, false, false);
if (r == -ENOTTY) {