diff options
author | NeilBrown <neilb@suse.com> | 2016-12-06 12:44:12 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2016-12-20 13:29:04 -0500 |
commit | 2d230e3e762e9ff543b4d037696a79ff9c328dcf (patch) | |
tree | 95e95bf163c3bc106b102c1507ecd3ee0db9ba94 /support/include | |
parent | 0cc5c137baad73613441b7475f1e0873e2a5dcc3 (diff) | |
download | nfs-utils-2d230e3e762e9ff543b4d037696a79ff9c328dcf.tar.gz nfs-utils-2d230e3e762e9ff543b4d037696a79ff9c328dcf.tar.xz nfs-utils-2d230e3e762e9ff543b4d037696a79ff9c328dcf.zip |
conffile: add bool support
conf_get_bool() interprets various strings as 'true' or 'false'.
If no suitable value is found, the default is returned.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/include')
-rw-r--r-- | support/include/conffile.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/support/include/conffile.h b/support/include/conffile.h index a6d5846..3fe3a78 100644 --- a/support/include/conffile.h +++ b/support/include/conffile.h @@ -36,6 +36,7 @@ #include <sys/queue.h> #include <ctype.h> #include <stdint.h> +#include <stdbool.h> struct conf_list_node { TAILQ_ENTRY(conf_list_node) link; @@ -57,6 +58,7 @@ extern struct sockaddr *conf_get_address(char *, char *); extern struct conf_list *conf_get_list(char *, char *); extern struct conf_list *conf_get_tag_list(char *, char *); extern int conf_get_num(char *, char *, int); +extern _Bool conf_get_bool(char *, char *, _Bool); extern char *conf_get_str(char *, char *); extern char *conf_get_section(char *, char *, char *); extern void conf_init(void); |