From 6d9bcd67e99ad638ca260f04cff401e7d9ebe3c5 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Sun, 3 Oct 2010 14:57:11 +0000 Subject: volgen: impemlent dynamic (pattern-based) option matching So now auth.addr.*.allow can be a basic option, without any specific support code! Signed-off-by: Csaba Henk Signed-off-by: Vijay Bellur BUG: 1750 (clean up volgen) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1750 --- xlators/mgmt/glusterd/src/glusterd-store.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 7c18b69a9..e6aa91b4f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -972,7 +972,7 @@ glusterd_store_retrieve_volume (char *volname) char volpath[PATH_MAX] = {0,}; glusterd_conf_t *priv = NULL; char path[PATH_MAX] = {0,}; - gf_boolean_t exists = _gf_false; + int exists = 0; ret = glusterd_volinfo_new (&volinfo); @@ -1029,6 +1029,10 @@ glusterd_store_retrieve_volume (char *volname) "failed to parse uuid"); } else { exists = glusterd_check_option_exists (key); + if (exists == -1) { + ret = -1; + goto out; + } if (exists) { ret = dict_set_str(volinfo->dict, key, gf_strdup (value)); @@ -1125,7 +1129,7 @@ void _setopts(dict_t *this, char *key, data_t *value, void *data) { int ret = 0; glusterd_store_handle_t *shandle = NULL; - gf_boolean_t exists = _gf_false; + int exists = 0; shandle = (glusterd_store_handle_t *) data; @@ -1137,7 +1141,7 @@ void _setopts(dict_t *this, char *key, data_t *value, void *data) return; exists = glusterd_check_option_exists (key); - if (exists) + if (exists == 1) gf_log ("", GF_LOG_DEBUG, "Storing in volinfo:key= %s, val=%s", key, value->data); else { -- cgit