summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2017-07-13 08:10:27 -0400
committerJeff Darcy <jeff@pl.atyp.us>2017-07-14 02:42:23 +0000
commite648a291b02298d2f1063cedaad9a58614ebe0ad (patch)
tree48e9b1b66e47cb1855b4912bd940449f3fe6400b /xlators/mgmt/glusterd/src/glusterd-handler.c
parentd2650feb4bfadf3fb0cdb90236bc78c33b5ea451 (diff)
core: miscellaneous cleanup
clean up things that I tripped over doing other changes. 1) fix mishmash of random spacing in struct decls in glusterfs.h. Not technically a problem, just ugly to look at. 2) replace open-coded strings constants with existing #define constants. A disaster waiting to happen. 3) Use sys_access() instead of sys_stat() or sys_lstat() to test simple existence of file. Why copy dozens of bytes from kernel to user space that aren't going to be used by anything? There are probably more instances like these. Change-Id: I28089bef4cc93d5e4e4213045fb1a2649d110f82 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/17769 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index b86580f9f0b..3a6445d8ace 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -4721,11 +4721,12 @@ glusterd_get_volume_opts (rpcsvc_request_t *req, dict_t *dict)
}
}
- if (strcmp (key, "cluster.max-op-version") == 0) {
+ if (strcmp (key, GLUSTERD_MAX_OP_VERSION_KEY) == 0) {
ret = glusterd_get_global_max_op_version (req, dict, 1);
if (ret)
goto out;
- } else if (strcmp (key, "cluster.op-version") == 0) {
+ } else if (strcmp (key,
+ GLUSTERD_GLOBAL_OP_VERSION_KEY) == 0) {
sprintf (dict_key, "key%d", count);
ret = dict_set_str(dict, dict_key, key);
if (ret) {
@@ -4958,7 +4959,7 @@ glusterd_print_global_options (dict_t *opts, char *key, data_t *val, void *data)
GF_VALIDATE_OR_GOTO (THIS->name, val, out);
GF_VALIDATE_OR_GOTO (THIS->name, data, out);
- if (strcmp (key, "global-option-version") == 0)
+ if (strcmp (key, GLUSTERD_GLOBAL_OPT_VERSION) == 0)
goto out;
fp = (FILE *) data;