[systemd-devel] [PATCH] tmpfiles: allow Age to be set to 0d

Tom Gundersen teg at jklm.no
Mon Sep 3 06:07:32 PDT 2012


Mostly useful for testing purposes. Setting Age to 1s works just as
well, but it is surprising that using 0 does not work.

We had bug reports/confused users in the past, so it makes sense to
change this.
---
 src/tmpfiles/tmpfiles.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index e70332c..7c2a754 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -406,7 +406,7 @@ static int clean_item(Item *i) {
             i->type != IGNORE_PATH)
                 return 0;
 
-        if (!i->age_set || i->age <= 0)
+        if (!i->age_set || i->age < 0)
                 return 0;
 
         n = now(CLOCK_REALTIME);
-- 
1.7.12



More information about the systemd-devel mailing list