|
|
21ab4e |
From a5ff4f6b0b8843b0591c258b7603b2ddbb88b588 Mon Sep 17 00:00:00 2001
|
|
|
21ab4e |
From: Kotresh HR <khiremat@redhat.com>
|
|
|
21ab4e |
Date: Wed, 19 Apr 2017 05:20:48 -0400
|
|
|
21ab4e |
Subject: [PATCH 387/393] glusterd: Fix build failure
|
|
|
21ab4e |
|
|
|
21ab4e |
"validate_boolean" routine is not in downstream
|
|
|
21ab4e |
and is only in upstream. But it's being used in
|
|
|
21ab4e |
commit "fc94bc56c6ba0eb9876be606092d6aa8407af0ae"
|
|
|
21ab4e |
causing the build failure. Fixing the same.
|
|
|
21ab4e |
|
|
|
21ab4e |
Label: DOWSNTREAM ONLY
|
|
|
21ab4e |
|
|
|
21ab4e |
Change-Id: Ie2df1c6cee12797b306266715bc2a682f0cf9cbf
|
|
|
21ab4e |
BUG: 1442026
|
|
|
21ab4e |
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
21ab4e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/103742
|
|
|
21ab4e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
---
|
|
|
21ab4e |
xlators/mgmt/glusterd/src/glusterd-volume-set.c | 22 ++++++++++++++++++++++
|
|
|
21ab4e |
1 file changed, 22 insertions(+)
|
|
|
21ab4e |
|
|
|
21ab4e |
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
|
|
|
21ab4e |
index 8e729da..bbb07b0 100644
|
|
|
21ab4e |
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
|
|
|
21ab4e |
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
|
|
|
21ab4e |
@@ -917,6 +917,28 @@ out:
|
|
|
21ab4e |
return ret;
|
|
|
21ab4e |
}
|
|
|
21ab4e |
|
|
|
21ab4e |
+static int
|
|
|
21ab4e |
+validate_boolean (glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
|
|
|
21ab4e |
+ char *value, char **op_errstr)
|
|
|
21ab4e |
+{
|
|
|
21ab4e |
+ xlator_t *this = NULL;
|
|
|
21ab4e |
+ gf_boolean_t b = _gf_false;
|
|
|
21ab4e |
+ int ret = -1;
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+ this = THIS;
|
|
|
21ab4e |
+ GF_VALIDATE_OR_GOTO ("glusterd", this, out);
|
|
|
21ab4e |
+ ret = gf_string2boolean (value, &b);
|
|
|
21ab4e |
+ if (ret) {
|
|
|
21ab4e |
+ gf_asprintf (op_errstr, "%s is not a valid boolean value. %s "
|
|
|
21ab4e |
+ "expects a valid boolean value.", value, key);
|
|
|
21ab4e |
+ gf_msg (this->name, GF_LOG_ERROR, 0,
|
|
|
21ab4e |
+ GD_MSG_INVALID_ENTRY, "%s", *op_errstr);
|
|
|
21ab4e |
+ }
|
|
|
21ab4e |
+out:
|
|
|
21ab4e |
+ gf_msg_debug ("glusterd", 0, "Returning %d", ret);
|
|
|
21ab4e |
+
|
|
|
21ab4e |
+ return ret;
|
|
|
21ab4e |
+}
|
|
|
21ab4e |
|
|
|
21ab4e |
static int
|
|
|
21ab4e |
validate_parallel_readdir (glusterd_volinfo_t *volinfo, dict_t *dict,
|
|
|
21ab4e |
--
|
|
|
21ab4e |
1.8.3.1
|
|
|
21ab4e |
|