summaryrefslogtreecommitdiff
path: root/src/import/import-raw.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-04 11:52:57 +0200
committerLennart Poettering <lennart@poettering.net>2015-04-06 10:57:53 +0200
commitc6878637502b1717a110a9a7e8bba32a8583fcdf (patch)
tree44bd9f305f8f3b97a0c736c3ac549e568b6495cd /src/import/import-raw.c
parent2f653bded321fc2271edcda43d54fcc3e6c20dc9 (diff)
util: rework rm_rf() logic
- Move to its own file rm-rf.c - Change parameters into a single flags parameter - Remove "honour sticky" logic, it's unused these days
Diffstat (limited to 'src/import/import-raw.c')
-rw-r--r--src/import/import-raw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/import/import-raw.c b/src/import/import-raw.c
index 7d1ac2afd7..3a315139e5 100644
--- a/src/import/import-raw.c
+++ b/src/import/import-raw.c
@@ -28,6 +28,7 @@
#include "btrfs-util.h"
#include "copy.h"
#include "mkdir.h"
+#include "rm-rf.h"
#include "ratelimit.h"
#include "machine-pool.h"
#include "qcow2-util.h"
@@ -242,7 +243,7 @@ static int raw_import_finish(RawImport *i) {
if (i->force_local) {
(void) btrfs_subvol_remove(i->final_path);
- (void) rm_rf_dangerous(i->final_path, false, true, false);
+ (void) rm_rf(i->final_path, REMOVE_ROOT|REMOVE_PHYSICAL);
}
r = rename_noreplace(AT_FDCWD, i->temp_path, AT_FDCWD, i->final_path);