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

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