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

306fa1
autofs-5.1.5 - remove unused function has_fstab_option()
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
This function is not used, remove it.
306fa1
306fa1
Signed-off-by: Ian Kent <raven@themaw.net>
306fa1
---
306fa1
 CHANGELOG        |    1 +
306fa1
 include/mounts.h |    1 -
306fa1
 lib/mounts.c     |   29 -----------------------------
306fa1
 3 files changed, 1 insertion(+), 30 deletions(-)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -329,6 +329,7 @@
306fa1
 - allow period following macro in selector value.
306fa1
 - fix macro expansion in selector values.
306fa1
 - fix reset flex scan buffer on init.
306fa1
+- remove unused function has_fstab_option().
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
--- autofs-5.0.7.orig/include/mounts.h
306fa1
+++ autofs-5.0.7/include/mounts.h
306fa1
@@ -103,7 +103,6 @@ struct mnt_list *get_mnt_list(const char
306fa1
 struct mnt_list *reverse_mnt_list(struct mnt_list *list);
306fa1
 void free_mnt_list(struct mnt_list *list);
306fa1
 int is_mounted(const char *table, const char *path, unsigned int type);
306fa1
-int has_fstab_option(const char *opt);
306fa1
 void tree_free_mnt_tree(struct mnt_list *tree);
306fa1
 struct mnt_list *tree_make_mnt_tree(const char *table, const char *path);
306fa1
 int tree_get_mnt_list(struct mnt_list *mnts, struct list_head *list, const char *path, int include);
306fa1
--- autofs-5.0.7.orig/lib/mounts.c
306fa1
+++ autofs-5.0.7/lib/mounts.c
306fa1
@@ -1020,35 +1020,6 @@ int is_mounted(const char *table, const
306fa1
 		return table_is_mounted(table, path, type);
306fa1
 }
306fa1
 
306fa1
-int has_fstab_option(const char *opt)
306fa1
-{
306fa1
-	struct mntent *mnt;
306fa1
-	struct mntent mnt_wrk;
306fa1
-	char buf[PATH_MAX * 3];
306fa1
-	FILE *tab;
306fa1
-	int ret = 0;
306fa1
-
306fa1
-	if (!opt)
306fa1
-		return 0;
306fa1
-
306fa1
-	tab = open_setmntent_r(_PATH_MNTTAB);
306fa1
-	if (!tab) {
306fa1
-		char *estr = strerror_r(errno, buf, PATH_MAX - 1);
306fa1
-		logerr("setmntent: %s", estr);
306fa1
-		return 0;
306fa1
-	}
306fa1
-
306fa1
-	while ((mnt = getmntent_r(tab, &mnt_wrk, buf, PATH_MAX * 3))) {
306fa1
-		if (hasmntopt(mnt, opt)) {
306fa1
-			ret = 1;
306fa1
-			break;
306fa1
-		}
306fa1
-	}
306fa1
-	endmntent(tab);
306fa1
-
306fa1
-	return ret;
306fa1
-}
306fa1
-
306fa1
 /*
306fa1
  * Since we have to look at the entire mount tree for direct
306fa1
  * mounts (all mounts under "/") and we may have a large number