summaryrefslogtreecommitdiff
path: root/src/import/pull-raw.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-raw.c
parent41d1ed059bbc863c73161f39594de2eb7b338886 (diff)
btrfs: support recursively removing btrfs snapshots
Diffstat (limited to 'src/import/pull-raw.c')
-rw-r--r--src/import/pull-raw.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/import/pull-raw.c b/src/import/pull-raw.c
index e10b280b66..ebbe6a9cd3 100644
--- a/src/import/pull-raw.c
+++ b/src/import/pull-raw.c
@@ -277,10 +277,8 @@ static int raw_pull_make_local_copy(RawPull *i) {
p = strjoina(i->image_root, "/", i->local, ".raw");
- if (i->force_local) {
- (void) btrfs_subvol_remove(p);
- (void) rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL);
- }
+ if (i->force_local)
+ (void) rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL|REMOVE_SUBVOLUME);
r = tempfn_random(p, &tp);
if (r < 0)