Add configuration function to get the map_options option from an amd mount configuration section. Signed-off-by: Ian Kent <raven@xxxxxxxxxx> --- CHANGELOG | 1 + include/defaults.h | 1 + lib/defaults.c | 14 ++++++++++++++ 3 files changed, 16 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 3615de7..115afdb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -43,6 +43,7 @@ xx/xx/2016 autofs-5.1.3 - add function conf_amd_get_mount_paths(). - include amd mount sections mounts in master mounts list. - check for conflicting amd section mounts. +- add function conf_get_map_options(). 15/06/2016 autofs-5.1.2 ======================= diff --git a/include/defaults.h b/include/defaults.h index 7766196..7f0129b 100644 --- a/include/defaults.h +++ b/include/defaults.h @@ -196,6 +196,7 @@ 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_options(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 102eda5..4a14367 100644 --- a/lib/defaults.c +++ b/lib/defaults.c @@ -501,6 +501,11 @@ static int conf_load_amd_defaults(void) if (ret == CFG_FAIL) goto error; + ret = conf_update(sec, NAME_AMD_MAP_OPTIONS, + DEFAULT_AMD_MAP_OPTIONS, CONF_NONE); + if (ret == CFG_FAIL) + goto error; + ret = conf_update(sec, NAME_AMD_MAP_TYPE, DEFAULT_AMD_MAP_TYPE, CONF_NONE); if (ret == CFG_FAIL) @@ -2024,6 +2029,15 @@ char *conf_amd_get_map_name(const char *section) return tmp; } +char *conf_amd_get_map_options(const char *section) +{ + char *tmp = NULL; + if (section) + tmp = conf_get_string(section, NAME_AMD_MAP_OPTIONS); + + 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