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

306fa1
autofs-5.1.2 - add function conf_amd_get_map_name()
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
Add configuration function to get the map_name 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     |   10 ++++++++++
306fa1
 3 files changed, 12 insertions(+)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -225,6 +225,7 @@
306fa1
 - fix typos in README.amd-maps.
306fa1
 - add ref counting to struct map_source.
306fa1
 - add support for amd browsable option.
306fa1
+- add function conf_amd_get_map_name().
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
@@ -191,6 +191,7 @@ char *conf_amd_get_nfs_proto(void);
306fa1
 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_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
@@ -105,6 +105,7 @@
306fa1
 #define NAME_AMD_MAP_DEFAULTS			"map_defaults"
306fa1
 #define NAME_AMD_MAP_OPTIONS			"map_options"
306fa1
 #define NAME_AMD_MAP_RELOAD_INTERVAL		"map_reload_interval"
306fa1
+#define NAME_AMD_MAP_NAME			"map_name"
306fa1
 #define NAME_AMD_MAP_TYPE			"map_type"
306fa1
 #define NAME_AMD_MOUNT_TYPE			"mount_type"
306fa1
 #define NAME_AMD_PID_FILE			"pid_file"
306fa1
@@ -1914,6 +1915,15 @@ char *conf_amd_get_map_defaults(const ch
306fa1
 
306fa1
 	return tmp;
306fa1
 }
306fa1
+
306fa1
+char *conf_amd_get_map_name(const char *section)
306fa1
+{
306fa1
+	char *tmp = NULL;
306fa1
+	if (section)
306fa1
+		tmp = conf_get_string(section, NAME_AMD_MAP_NAME);
306fa1
+
306fa1
+	return tmp;
306fa1
+}
306fa1
 
306fa1
 char *conf_amd_get_map_type(const char *section)
306fa1
 {