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/aufs-util.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/aufs-util.c')
-rw-r--r-- | src/import/aufs-util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/import/aufs-util.c b/src/import/aufs-util.c index c1301cdb4a..18c42b8b6d 100644 --- a/src/import/aufs-util.c +++ b/src/import/aufs-util.c @@ -22,6 +22,7 @@ #include <ftw.h> #include "util.h" +#include "rm-rf.h" #include "aufs-util.h" static int nftw_cb( @@ -43,7 +44,7 @@ static int nftw_cb( return FTW_CONTINUE; log_debug("Removing whiteout indicator %s.", fpath); - r = rm_rf_dangerous(fpath, false, true, false); + r = rm_rf(fpath, REMOVE_ROOT|REMOVE_PHYSICAL); if (r < 0) return FTW_STOP; @@ -53,7 +54,7 @@ static int nftw_cb( strcpy(mempcpy(p, fpath, ftwbuf->base), original); log_debug("Removing deleted file %s.", p); - r = rm_rf_dangerous(p, false, true, false); + r = rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL); if (r < 0) return FTW_STOP; } |