diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-04-04 11:52:57 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-04-06 10:57:53 +0200 |
commit | c6878637502b1717a110a9a7e8bba32a8583fcdf (patch) | |
tree | 44bd9f305f8f3b97a0c736c3ac549e568b6495cd /src/import/pull-common.c | |
parent | 2f653bded321fc2271edcda43d54fcc3e6c20dc9 (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/pull-common.c')
-rw-r--r-- | src/import/pull-common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/import/pull-common.c b/src/import/pull-common.c index 94dd54bd57..d4cebe205e 100644 --- a/src/import/pull-common.c +++ b/src/import/pull-common.c @@ -24,6 +24,7 @@ #include "util.h" #include "strv.h" #include "copy.h" +#include "rm-rf.h" #include "btrfs-util.h" #include "capability.h" #include "pull-job.h" @@ -125,7 +126,7 @@ int pull_make_local_copy(const char *final, const char *image_root, const char * if (force_local) { (void) btrfs_subvol_remove(p); - (void) rm_rf_dangerous(p, false, true, false); + (void) rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL); } r = btrfs_subvol_snapshot(final, p, false, false); @@ -418,7 +419,7 @@ finish: unlink(sig_file_path); if (gpg_home_created) - rm_rf_dangerous(gpg_home, false, true, false); + (void) rm_rf(gpg_home, REMOVE_ROOT|REMOVE_PHYSICAL); return r; } |