chiark / gitweb /
Prep v239: Uncomment header inclusions that are new or needed now.
[elogind.git] / src / basic / rm-rf.c
index 4ebc5c60a35936d5af4392b6c8b131e8fd6c748c..1b0de8bd0244d5928171dd29b2488cd5dc912e63 100644 (file)
@@ -1,9 +1,4 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-/***
-  This file is part of systemd.
-
-  Copyright 2015 Lennart Poettering
-***/
 
 #include <errno.h>
 #include <fcntl.h>
@@ -13,7 +8,7 @@
 #include <sys/statfs.h>
 #include <unistd.h>
 
-//#include "alloc-util.h"
+#include "alloc-util.h"
 //#include "btrfs-util.h"
 #include "cgroup-util.h"
 #include "dirent-util.h"
@@ -181,7 +176,7 @@ int rm_rf(const char *path, RemoveFlags flags) {
         }
 
 #if 0 /// elogind does not support BTRFS this directly
-        if ((flags & (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) == (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) {
+        if (FLAGS_SET(flags, REMOVE_SUBVOLUME | REMOVE_ROOT | REMOVE_PHYSICAL)) {
                 /* Try to remove as subvolume first */
                 r = btrfs_subvol_remove(path, BTRFS_REMOVE_RECURSIVE|BTRFS_REMOVE_QUOTA);
                 if (r >= 0)