[PATCH 13/34] autofs-5.1.2 - add function conf_amd_get_map_name()

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

 



Add configuration function to get the map_name option from
an amd mount configuration section.

Signed-off-by: Ian Kent <raven@xxxxxxxxxx>
---
 CHANGELOG          |    1 +
 include/defaults.h |    1 +
 lib/defaults.c     |   10 ++++++++++
 3 files changed, 12 insertions(+)

diff --git a/CHANGELOG b/CHANGELOG
index b67fd56..ac195ed 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -39,6 +39,7 @@ xx/xx/2016 autofs-5.1.3
 - fix typos in README.amd-maps.
 - add ref counting to struct map_source.
 - add support for amd browsable option.
+- add function conf_amd_get_map_name().
 
 15/06/2016 autofs-5.1.2
 =======================
diff --git a/include/defaults.h b/include/defaults.h
index b93fda3..650f3e6 100644
--- a/include/defaults.h
+++ b/include/defaults.h
@@ -194,6 +194,7 @@ char *conf_amd_get_nfs_proto(void);
 char *conf_amd_get_nis_domain(void);
 unsigned int conf_amd_set_nis_domain(const char *);
 char *conf_amd_get_map_defaults(const char *);
+char *conf_amd_get_map_name(const char *);
 char *conf_amd_get_map_type(const char *);
 char *conf_amd_get_search_path(const char *);
 unsigned int conf_amd_get_dismount_interval(const char *);
diff --git a/lib/defaults.c b/lib/defaults.c
index 3ac231b..fba5d78 100644
--- a/lib/defaults.c
+++ b/lib/defaults.c
@@ -108,6 +108,7 @@
 #define NAME_AMD_MAP_DEFAULTS			"map_defaults"
 #define NAME_AMD_MAP_OPTIONS			"map_options"
 #define NAME_AMD_MAP_RELOAD_INTERVAL		"map_reload_interval"
+#define NAME_AMD_MAP_NAME			"map_name"
 #define NAME_AMD_MAP_TYPE			"map_type"
 #define NAME_AMD_MOUNT_TYPE			"mount_type"
 #define NAME_AMD_PID_FILE			"pid_file"
@@ -1934,6 +1935,15 @@ char *conf_amd_get_map_defaults(const char *section)
 	return tmp;
 }
 
+char *conf_amd_get_map_name(const char *section)
+{
+	char *tmp = NULL;
+	if (section)
+		tmp = conf_get_string(section, NAME_AMD_MAP_NAME);
+
+	return tmp;
+}
+
 char *conf_amd_get_map_type(const char *section)
 {
 	char *tmp = NULL;

--
To unsubscribe from this list: send the line "unsubscribe autofs" in



[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