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

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