diff options
author | Csaba Henk <csaba@gluster.com> | 2010-10-03 14:57:11 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-04 02:43:53 -0700 |
commit | 6d9bcd67e99ad638ca260f04cff401e7d9ebe3c5 (patch) | |
tree | c613842489536ebc76cf4d991095962294f5b975 /xlators/mgmt/glusterd/src/glusterd-store.c | |
parent | 609a89ceace25a0a81d0a9cafde3a4d1afd1b916 (diff) |
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 <csaba@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1750 (clean up volgen)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1750
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 7c18b69a927..e6aa91b4ff9 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 { |