diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2015-04-16 17:45:04 +0530 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2015-04-26 21:54:29 -0700 |
commit | 4c3724f195240e40994b71add255f85ee1b025fb (patch) | |
tree | 33826be8145a49ab7b7c4082aa46aa64dc8ca172 /cli/src/cli-xml-output.c | |
parent | 004f64e93d23f44144483d21422f47e81d358045 (diff) |
cli: fix vol_type in volume info xml
xml parsing of voltype should be inline with the cli
Change-Id: I41ddddac00d07f03b56a041e1c3f5a132fbd7393
BUG: 1212398
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/10271
Tested-by: NetBSD Build System
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'cli/src/cli-xml-output.c')
-rw-r--r-- | cli/src/cli-xml-output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index e5afe1b427d..cbb4c1f58e7 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -2687,8 +2687,10 @@ cli_xml_output_vol_info (cli_local_t *local, dict_t *dict) /* For Distributed-(stripe,replicate,stipe-replicate,disperse) types */ - if ((type > 0) && (dist_count < brick_count)) - type += 4; + if ((type != GF_CLUSTER_TYPE_TIER) && (type > 0) && + (dist_count < brick_count)) + type = type + GF_CLUSTER_TYPE_MAX - 1; + ret = xmlTextWriterWriteFormatElement (local->writer, (xmlChar *)"type", "%d", type); |