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

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