aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/conf.c13
-rw-r--r--src/conf.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/src/conf.c b/src/conf.c
index 77dafbbcf..2a5ea9e5f 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -362,6 +362,19 @@ char *getConfigParamValue(char *name)
return param->value;
}
+int getBoolConfigParam(char *name)
+{
+ ConfigParam *param;
+
+ param = getConfigParam(name);
+ if (!param) return -1;
+
+ if (strcmp("yes", param->value) == 0) return 1;
+ else if (strcmp("no", param->value) == 0) return 0;
+
+ return -1;
+}
+
BlockParam *getBlockParam(ConfigParam * param, char *name)
{
BlockParam *ret = NULL;
diff --git a/src/conf.h b/src/conf.h
index 5e86d1bc5..fd68ca327 100644
--- a/src/conf.h
+++ b/src/conf.h
@@ -85,6 +85,8 @@ ConfigParam *getNextConfigParam(char *name, ConfigParam * last);
char *getConfigParamValue(char *name);
+int getBoolConfigParam(char *name);
+
BlockParam *getBlockParam(ConfigParam * param, char *name);
ConfigParam *parseConfigFilePath(char *name, int force);