Blame SOURCES/autofs-5.1.4-change-expire-type-naming-to-better-reflect-usage.patch

135b98
autofs-5.1.4 - change expire type naming to better reflect usage
135b98
135b98
From: Ian Kent <raven@themaw.net>
135b98
135b98
Expires can request different types of expire, currently normal or
135b98
immediate (and later force).
135b98
135b98
Change the naming used in the expire functions to better indicate
135b98
usage.
135b98
135b98
Signed-off-by: Ian Kent <raven@themaw.net>
135b98
---
135b98
 CHANGELOG         |    1 +
135b98
 daemon/direct.c   |    8 ++++----
135b98
 daemon/indirect.c |    8 ++++----
135b98
 daemon/state.c    |    4 ++--
135b98
 include/state.h   |    2 +-
135b98
 5 files changed, 12 insertions(+), 11 deletions(-)
135b98
135b98
--- autofs-5.1.4.orig/CHANGELOG
135b98
+++ autofs-5.1.4/CHANGELOG
135b98
@@ -54,6 +54,7 @@ xx/xx/2018 autofs-5.1.5
135b98
 - allow period following macro in selector value.
135b98
 - fix macro expansion in selector values.
135b98
 - also use strictexpire for offsets.
135b98
+- change expire type naming to better reflect usage.
135b98
 
135b98
 19/12/2017 autofs-5.1.4
135b98
 - fix spec file url.
135b98
--- autofs-5.1.4.orig/daemon/direct.c
135b98
+++ autofs-5.1.4/daemon/direct.c
135b98
@@ -861,7 +861,7 @@ void *expire_proc_direct(void *arg)
135b98
 	struct expire_args ec;
135b98
 	struct autofs_point *ap;
135b98
 	struct mapent *me = NULL;
135b98
-	unsigned int now;
135b98
+	unsigned int how;
135b98
 	int ioctlfd, cur_state;
135b98
 	int status, ret, left;
135b98
 
135b98
@@ -872,7 +872,7 @@ void *expire_proc_direct(void *arg)
135b98
 		fatal(status);
135b98
 
135b98
 	ap = ec.ap = ea->ap;
135b98
-	now = ea->when;
135b98
+	how = ea->how;
135b98
 	ec.status = -1;
135b98
 
135b98
 	ea->signaled = 1;
135b98
@@ -966,7 +966,7 @@ void *expire_proc_direct(void *arg)
135b98
 
135b98
 			ioctlfd = me->ioctlfd;
135b98
 
135b98
-			ret = ops->expire(ap->logopt, ioctlfd, next->path, now);
135b98
+			ret = ops->expire(ap->logopt, ioctlfd, next->path, how);
135b98
 			if (ret) {
135b98
 				left++;
135b98
 				pthread_setcancelstate(cur_state, NULL);
135b98
@@ -992,7 +992,7 @@ void *expire_proc_direct(void *arg)
135b98
 		debug(ap->logopt, "send expire to trigger %s", next->path);
135b98
 
135b98
 		pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cur_state);
135b98
-		ret = ops->expire(ap->logopt, ioctlfd, next->path, now);
135b98
+		ret = ops->expire(ap->logopt, ioctlfd, next->path, how);
135b98
 		if (ret)
135b98
 			left++;
135b98
 		pthread_setcancelstate(cur_state, NULL);
135b98
--- autofs-5.1.4.orig/daemon/indirect.c
135b98
+++ autofs-5.1.4/daemon/indirect.c
135b98
@@ -402,7 +402,7 @@ void *expire_proc_indirect(void *arg)
135b98
 	struct mnt_list *mnts = NULL, *next;
135b98
 	struct expire_args *ea;
135b98
 	struct expire_args ec;
135b98
-	unsigned int now;
135b98
+	unsigned int how;
135b98
 	int offsets, submnts, count;
135b98
 	int retries;
135b98
 	int ioctlfd, cur_state;
135b98
@@ -415,7 +415,7 @@ void *expire_proc_indirect(void *arg)
135b98
 		fatal(status);
135b98
 
135b98
 	ap = ec.ap = ea->ap;
135b98
-	now = ea->when;
135b98
+	how = ea->how;
135b98
 	ec.status = -1;
135b98
 
135b98
 	ea->signaled = 1;
135b98
@@ -540,7 +540,7 @@ void *expire_proc_indirect(void *arg)
135b98
 		debug(ap->logopt, "expire %s", next->path);
135b98
 
135b98
 		pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cur_state);
135b98
-		ret = ops->expire(ap->logopt, ioctlfd, next->path, now);
135b98
+		ret = ops->expire(ap->logopt, ioctlfd, next->path, how);
135b98
 		if (ret)
135b98
 			left++;
135b98
 		pthread_setcancelstate(cur_state, NULL);
135b98
@@ -554,7 +554,7 @@ void *expire_proc_indirect(void *arg)
135b98
 	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cur_state);
135b98
 	retries = (count_mounts(ap, ap->path, ap->dev) + 1);
135b98
 	while (retries--) {
135b98
-		ret = ops->expire(ap->logopt, ap->ioctlfd, ap->path, now);
135b98
+		ret = ops->expire(ap->logopt, ap->ioctlfd, ap->path, how);
135b98
 		if (ret)
135b98
 			left++;
135b98
 	}
135b98
--- autofs-5.1.4.orig/daemon/state.c
135b98
+++ autofs-5.1.4/daemon/state.c
135b98
@@ -267,7 +267,7 @@ void expire_proc_cleanup(void *arg)
135b98
 	return;
135b98
 }
135b98
 
135b98
-static enum expire expire_proc(struct autofs_point *ap, int now)
135b98
+static enum expire expire_proc(struct autofs_point *ap, int how)
135b98
 {
135b98
 	pthread_t thid;
135b98
 	struct expire_args *ea;
135b98
@@ -295,7 +295,7 @@ static enum expire expire_proc(struct au
135b98
 		fatal(status);
135b98
 
135b98
 	ea->ap = ap;
135b98
-	ea->when = now;
135b98
+	ea->how = how;
135b98
 	ea->status = 1;
135b98
 
135b98
 	if (ap->type == LKP_INDIRECT)
135b98
--- autofs-5.1.4.orig/include/state.h
135b98
+++ autofs-5.1.4/include/state.h
135b98
@@ -55,7 +55,7 @@ struct expire_args {
135b98
 	unsigned int signaled;
135b98
 	struct autofs_point *ap; /* autofs mount we are working on */
135b98
 	enum states state;	 /* State prune or expire */
135b98
-	unsigned int when;	 /* Immediate expire ? */
135b98
+	unsigned int how;	 /* Normal, immediate expire ? */
135b98
 	int status;		 /* Return status */
135b98
 };
135b98