Blame SOURCES/autofs-5.1.5-remove-unused-function-has_fstab_option.patch

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