Blame SOURCES/autofs-5.1.6-change-mountpoint-to-mp-in-struct-ext_mount.patch

49b67f
autofs-5.1.6 - change mountpoint to mp in struct ext_mount
49b67f
49b67f
From: Ian Kent <raven@themaw.net>
49b67f
49b67f
Use simple name mp instead of mountpoint in struct ext_mount.
49b67f
49b67f
Signed-off-by: Ian Kent <raven@themaw.net>
49b67f
---
49b67f
 CHANGELOG    |    1 +
49b67f
 lib/mounts.c |   14 +++++++-------
49b67f
 2 files changed, 8 insertions(+), 7 deletions(-)
49b67f
49b67f
--- autofs-5.1.4.orig/CHANGELOG
49b67f
+++ autofs-5.1.4/CHANGELOG
49b67f
@@ -118,6 +118,7 @@ xx/xx/2018 autofs-5.1.5
49b67f
 - fix browse dir not re-created on symlink expire.
49b67f
 - update list.h.
49b67f
 - add hashtable implementation.
49b67f
+- change mountpoint to mp in struct ext_mount.
49b67f
 
49b67f
 19/12/2017 autofs-5.1.4
49b67f
 - fix spec file url.
49b67f
--- autofs-5.1.4.orig/lib/mounts.c
49b67f
+++ autofs-5.1.4/lib/mounts.c
49b67f
@@ -54,7 +54,7 @@ static size_t maxgrpbuf = 0;
49b67f
 #define EXT_MOUNTS_HASH_SIZE    50
49b67f
 
49b67f
 struct ext_mount {
49b67f
-	char *mountpoint;
49b67f
+	char *mp;
49b67f
 	unsigned int umount;
49b67f
 	struct list_head mount;
49b67f
 	struct list_head mounts;
49b67f
@@ -743,9 +743,9 @@ static void ext_mounts_hash_init(void)
49b67f
 	ext_mounts_hash_init_done = 1;
49b67f
 }
49b67f
 
49b67f
-static struct ext_mount *ext_mount_lookup(const char *mountpoint)
49b67f
+static struct ext_mount *ext_mount_lookup(const char *mp)
49b67f
 {
49b67f
-	u_int32_t hval = hash(mountpoint, EXT_MOUNTS_HASH_SIZE);
49b67f
+	u_int32_t hval = hash(mp, EXT_MOUNTS_HASH_SIZE);
49b67f
 	struct list_head *p, *head;
49b67f
 
49b67f
 	if (!ext_mounts_hash_init_done)
49b67f
@@ -757,7 +757,7 @@ static struct ext_mount *ext_mount_looku
49b67f
 	head = &ext_mounts_hash[hval];
49b67f
 	list_for_each(p, head) {
49b67f
 		struct ext_mount *this = list_entry(p, struct ext_mount, mount);
49b67f
-		if (!strcmp(this->mountpoint, mountpoint))
49b67f
+		if (!strcmp(this->mp, mp))
49b67f
 			return this;
49b67f
 	}
49b67f
 	return NULL;
49b67f
@@ -788,8 +788,8 @@ int ext_mount_add(struct list_head *entr
49b67f
 	if (!em)
49b67f
 		goto done;
49b67f
 
49b67f
-	em->mountpoint = strdup(path);
49b67f
-	if (!em->mountpoint) {
49b67f
+	em->mp = strdup(path);
49b67f
+	if (!em->mp) {
49b67f
 		free(em);
49b67f
 		goto done;
49b67f
 	}
49b67f
@@ -828,7 +828,7 @@ int ext_mount_remove(struct list_head *e
49b67f
 		if (em->umount)
49b67f
 			ret = 1;
49b67f
 		if (list_empty(&em->mount)) {
49b67f
-			free(em->mountpoint);
49b67f
+			free(em->mp);
49b67f
 			free(em);
49b67f
 		}
49b67f
 	}