]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: make sure "R" lines also remove subvolumes
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Jun 2015 17:11:15 +0000 (19:11 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Jun 2015 17:28:55 +0000 (19:28 +0200)
src/tmpfiles/tmpfiles.c

index f7dad8491ed31d5447b29c08b5660c6b2766c4f6..027a5c2ca80c9dac522466297589b0895b415e67 100644 (file)
@@ -1465,7 +1465,7 @@ static int remove_item_instance(Item *i, const char *instance) {
                 /* FIXME: we probably should use dir_cleanup() here
                  * instead of rm_rf() so that 'x' is honoured. */
                 log_debug("rm -rf \"%s\"", instance);
-                r = rm_rf(instance, (i->type == RECURSIVE_REMOVE_PATH ? REMOVE_ROOT : 0) | REMOVE_PHYSICAL);
+                r = rm_rf(instance, (i->type == RECURSIVE_REMOVE_PATH ? REMOVE_ROOT|REMOVE_SUBVOLUME : 0) | REMOVE_PHYSICAL);
                 if (r < 0 && r != -ENOENT)
                         return log_error_errno(r, "rm_rf(%s): %m", instance);