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