[systemd-devel] [PATCH] tmpfiles: allow Age to be set to 0d
Lennart Poettering
lennart at poettering.net
Mon Sep 10 17:52:48 PDT 2012
On Mon, 03.09.12 15:07, Tom Gundersen (teg at jklm.no) wrote:
> 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.
What is the intended behaviour of an age setting of 0? if we add this we
probably should document that?
> ---
> 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);
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list