From 4c3724f195240e40994b71add255f85ee1b025fb Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Thu, 16 Apr 2015 17:45:04 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/10271 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Kaushal M --- cli/src/cli-cmd-parser.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cli/src/cli-cmd-parser.c') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 16067f5744b..74e8453dd6b 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -372,6 +372,9 @@ cli_validate_disperse_volume (char *word, gf1_cluster_type type, cli_err ("replicated-dispersed volume is not " "supported"); goto out; + default: + cli_err ("Invalid type given"); + break; } out: return ret; @@ -509,6 +512,9 @@ cli_cmd_volume_create_parse (struct cli_state *state, const char **words, cli_err ("replicated-dispersed volume is not " "supported"); goto out; + default: + cli_err ("Invalid type given"); + goto out; } if (wordcount < (index+2)) { @@ -571,6 +577,9 @@ cli_cmd_volume_create_parse (struct cli_state *state, const char **words, cli_err ("striped-tier volume is not " "supported"); goto out; + default: + cli_err ("Invalid type given"); + goto out; } if (wordcount < (index + 2)) { ret = -1; -- cgit