[PATCH 12/32] autofs-5.1.5 - remove unused function has_fstab_option()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This function is not used, remove it.

Signed-off-by: Ian Kent <raven@xxxxxxxxxx>
---
 CHANGELOG        |    1 +
 include/mounts.h |    1 -
 lib/mounts.c     |   29 -----------------------------
 3 files changed, 1 insertion(+), 30 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 9bb5343d..bcb025d4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -18,6 +18,7 @@ xx/xx/2019 autofs-5.1.6
 - update autofs(8) offset map entry update description.
 - increase group buffer size geometrically.
 - also use strictexpire for offsets.
+- remove unused function has_fstab_option().
 
 30/10/2018 autofs-5.1.5
 - fix flag file permission.
diff --git a/include/mounts.h b/include/mounts.h
index 74b23db6..4914cde9 100644
--- a/include/mounts.h
+++ b/include/mounts.h
@@ -103,7 +103,6 @@ struct mnt_list *get_mnt_list(const char *table, const char *path, int include);
 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);
diff --git a/lib/mounts.c b/lib/mounts.c
index 5a8e8cdb..b1cbf39a 100644
--- a/lib/mounts.c
+++ b/lib/mounts.c
@@ -1026,35 +1026,6 @@ int is_mounted(const char *table, const char *path, unsigned int type)
 		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




[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux