chiark / gitweb /
util: rework rm_rf() logic
[elogind.git] / src / shared / machine-image.c
index edf986d4db11801abb0ca47c79b8003793189f3a..c5808af81efe27dfb13cdf6805f9b3b3318a3d25 100644 (file)
@@ -28,6 +28,7 @@
 #include "path-util.h"
 #include "copy.h"
 #include "mkdir.h"
+#include "rm-rf.h"
 #include "machine-image.h"
 
 static const char image_search_path[] =
@@ -366,7 +367,7 @@ int image_remove(Image *i) {
                 /* fall through */
 
         case IMAGE_RAW:
-                return rm_rf_dangerous(i->path, false, true, false);
+                return rm_rf(i->path, REMOVE_ROOT|REMOVE_PHYSICAL);
 
         default:
                 return -EOPNOTSUPP;