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