autofs/SOURCES/autofs-5.1.5-remove-unused-...

72 lines
2.0 KiB
Diff

autofs-5.1.5 - remove unused function has_fstab_option()
From: Ian Kent <raven@themaw.net>
This function is not used, remove it.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
include/mounts.h | 1 -
lib/mounts.c | 29 -----------------------------
3 files changed, 1 insertion(+), 30 deletions(-)
--- autofs-5.1.4.orig/CHANGELOG
+++ autofs-5.1.4/CHANGELOG
@@ -55,6 +55,7 @@ xx/xx/2018 autofs-5.1.5
- fix macro expansion in selector values.
- also use strictexpire for offsets.
- change expire type naming to better reflect usage.
+- remove unused function has_fstab_option().
19/12/2017 autofs-5.1.4
- fix spec file url.
--- autofs-5.1.4.orig/include/mounts.h
+++ autofs-5.1.4/include/mounts.h
@@ -103,7 +103,6 @@ struct mnt_list *get_mnt_list(const char
struct mnt_list *reverse_mnt_list(struct mnt_list *list);
void free_mnt_list(struct mnt_list *list);
int is_mounted(const char *table, const char *path, unsigned int type);
-int has_fstab_option(const char *opt);
void tree_free_mnt_tree(struct mnt_list *tree);
struct mnt_list *tree_make_mnt_tree(const char *table, const char *path);
int tree_get_mnt_list(struct mnt_list *mnts, struct list_head *list, const char *path, int include);
--- autofs-5.1.4.orig/lib/mounts.c
+++ autofs-5.1.4/lib/mounts.c
@@ -1026,35 +1026,6 @@ int is_mounted(const char *table, const
return table_is_mounted(table, path, type);
}
-int has_fstab_option(const char *opt)
-{
- struct mntent *mnt;
- struct mntent mnt_wrk;
- char buf[PATH_MAX * 3];
- FILE *tab;
- int ret = 0;
-
- if (!opt)
- return 0;
-
- tab = open_setmntent_r(_PATH_MNTTAB);
- if (!tab) {
- char *estr = strerror_r(errno, buf, PATH_MAX - 1);
- logerr("setmntent: %s", estr);
- return 0;
- }
-
- while ((mnt = getmntent_r(tab, &mnt_wrk, buf, PATH_MAX * 3))) {
- if (hasmntopt(mnt, opt)) {
- ret = 1;
- break;
- }
- }
- endmntent(tab);
-
- return ret;
-}
-
/*
* Since we have to look at the entire mount tree for direct
* mounts (all mounts under "/") and we may have a large number