Blob Blame History Raw
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.0.7.orig/CHANGELOG
+++ autofs-5.0.7/CHANGELOG
@@ -329,6 +329,7 @@
 - allow period following macro in selector value.
 - fix macro expansion in selector values.
 - fix reset flex scan buffer on init.
+- remove unused function has_fstab_option().
 
 25/07/2012 autofs-5.0.7
 =======================
--- autofs-5.0.7.orig/include/mounts.h
+++ autofs-5.0.7/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.0.7.orig/lib/mounts.c
+++ autofs-5.0.7/lib/mounts.c
@@ -1020,35 +1020,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