Blame SOURCES/autofs-5.1.2-add-function-conf_amd_get_map_options.patch

306fa1
autofs-5.1.2 - add function conf_amd_get_map_options()
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
Add configuration function to get the map_options option from
306fa1
an amd mount configuration section.
306fa1
306fa1
Signed-off-by: Ian Kent <raven@themaw.net>
306fa1
---
306fa1
 CHANGELOG          |    1 +
306fa1
 include/defaults.h |    1 +
306fa1
 lib/defaults.c     |   14 ++++++++++++++
306fa1
 3 files changed, 16 insertions(+)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -229,6 +229,7 @@
306fa1
 - add function conf_amd_get_mount_paths().
306fa1
 - include amd mount sections mounts in master mounts list.
306fa1
 - check for conflicting amd section mounts.
306fa1
+- add function conf_get_map_options().
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
--- autofs-5.0.7.orig/include/defaults.h
306fa1
+++ autofs-5.0.7/include/defaults.h
306fa1
@@ -193,6 +193,7 @@ char *conf_amd_get_nis_domain(void);
306fa1
 unsigned int conf_amd_set_nis_domain(const char *);
306fa1
 char *conf_amd_get_map_defaults(const char *);
306fa1
 char *conf_amd_get_map_name(const char *);
306fa1
+char *conf_amd_get_map_options(const char *);
306fa1
 char *conf_amd_get_map_type(const char *);
306fa1
 char *conf_amd_get_search_path(const char *);
306fa1
 unsigned int conf_amd_get_dismount_interval(const char *);
306fa1
--- autofs-5.0.7.orig/lib/defaults.c
306fa1
+++ autofs-5.0.7/lib/defaults.c
306fa1
@@ -493,6 +493,11 @@ static int conf_load_amd_defaults(void)
306fa1
 	if (ret == CFG_FAIL)
306fa1
 		goto error;
306fa1
 
306fa1
+	ret = conf_update(sec, NAME_AMD_MAP_OPTIONS,
306fa1
+			  DEFAULT_AMD_MAP_OPTIONS, CONF_NONE);
306fa1
+	if (ret == CFG_FAIL)
306fa1
+		goto error;
306fa1
+
306fa1
 	ret = conf_update(sec, NAME_AMD_MAP_TYPE,
306fa1
 			  DEFAULT_AMD_MAP_TYPE, CONF_NONE);
306fa1
 	if (ret == CFG_FAIL)
306fa1
@@ -2004,6 +2009,15 @@ char *conf_amd_get_map_name(const char *
306fa1
 
306fa1
 	return tmp;
306fa1
 }
306fa1
+
306fa1
+char *conf_amd_get_map_options(const char *section)
306fa1
+{
306fa1
+	char *tmp = NULL;
306fa1
+	if (section)
306fa1
+		tmp = conf_get_string(section, NAME_AMD_MAP_OPTIONS);
306fa1
+
306fa1
+	return tmp;
306fa1
+}
306fa1
 
306fa1
 char *conf_amd_get_map_type(const char *section)
306fa1
 {