diff --git a/CHANGELOG b/CHANGELOG index aee056c..9a12f10 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -54,6 +54,7 @@ xx/xx/2018 autofs-5.1.5 - allow period following macro in selector value. - fix macro expansion in selector values. - also use strictexpire for offsets. +- change expire type naming to better reflect usage. 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/daemon/direct.c b/daemon/direct.c index f92bcc0..210f20f 100644 --- a/daemon/direct.c +++ b/daemon/direct.c @@ -861,7 +861,7 @@ void *expire_proc_direct(void *arg) struct expire_args ec; struct autofs_point *ap; struct mapent *me = NULL; - unsigned int now; + unsigned int how; int ioctlfd, cur_state; int status, ret, left; @@ -872,7 +872,7 @@ void *expire_proc_direct(void *arg) fatal(status); ap = ec.ap = ea->ap; - now = ea->when; + how = ea->how; ec.status = -1; ea->signaled = 1; @@ -966,7 +966,7 @@ void *expire_proc_direct(void *arg) ioctlfd = me->ioctlfd; - ret = ops->expire(ap->logopt, ioctlfd, next->path, now); + ret = ops->expire(ap->logopt, ioctlfd, next->path, how); if (ret) { left++; pthread_setcancelstate(cur_state, NULL); @@ -992,7 +992,7 @@ void *expire_proc_direct(void *arg) debug(ap->logopt, "send expire to trigger %s", next->path); pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cur_state); - ret = ops->expire(ap->logopt, ioctlfd, next->path, now); + ret = ops->expire(ap->logopt, ioctlfd, next->path, how); if (ret) left++; pthread_setcancelstate(cur_state, NULL); diff --git a/daemon/indirect.c b/daemon/indirect.c index 7b1d34c..d38c212 100644 --- a/daemon/indirect.c +++ b/daemon/indirect.c @@ -402,7 +402,7 @@ void *expire_proc_indirect(void *arg) struct mnt_list *mnts = NULL, *next; struct expire_args *ea; struct expire_args ec; - unsigned int now; + unsigned int how; int offsets, submnts, count; int retries; int ioctlfd, cur_state; @@ -415,7 +415,7 @@ void *expire_proc_indirect(void *arg) fatal(status); ap = ec.ap = ea->ap; - now = ea->when; + how = ea->how; ec.status = -1; ea->signaled = 1; @@ -540,7 +540,7 @@ void *expire_proc_indirect(void *arg) debug(ap->logopt, "expire %s", next->path); pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cur_state); - ret = ops->expire(ap->logopt, ioctlfd, next->path, now); + ret = ops->expire(ap->logopt, ioctlfd, next->path, how); if (ret) left++; pthread_setcancelstate(cur_state, NULL); @@ -554,7 +554,7 @@ void *expire_proc_indirect(void *arg) pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cur_state); retries = (count_mounts(ap, ap->path, ap->dev) + 1); while (retries--) { - ret = ops->expire(ap->logopt, ap->ioctlfd, ap->path, now); + ret = ops->expire(ap->logopt, ap->ioctlfd, ap->path, how); if (ret) left++; } diff --git a/daemon/state.c b/daemon/state.c index cf835e0..ab23545 100644 --- a/daemon/state.c +++ b/daemon/state.c @@ -267,7 +267,7 @@ void expire_proc_cleanup(void *arg) return; } -static enum expire expire_proc(struct autofs_point *ap, int now) +static enum expire expire_proc(struct autofs_point *ap, int how) { pthread_t thid; struct expire_args *ea; @@ -295,7 +295,7 @@ static enum expire expire_proc(struct autofs_point *ap, int now) fatal(status); ea->ap = ap; - ea->when = now; + ea->how = how; ea->status = 1; if (ap->type == LKP_INDIRECT) diff --git a/include/state.h b/include/state.h index b44a353..e3079c2 100644 --- a/include/state.h +++ b/include/state.h @@ -55,7 +55,7 @@ struct expire_args { unsigned int signaled; struct autofs_point *ap; /* autofs mount we are working on */ enum states state; /* State prune or expire */ - unsigned int when; /* Immediate expire ? */ + unsigned int how; /* Normal, immediate expire ? */ int status; /* Return status */ };