summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijaikumar M <vmallika@redhat.com>2014-03-25 13:08:37 +0530
committerRajesh Joseph <rjoseph@redhat.com>2014-03-25 01:18:18 -0700
commitb8d3a5f7dcd048dfdfeff2f3d0155d6103041be0 (patch)
tree31cef83a5ea4544340d6f903056dc7c36b27250e
parent123db32a53f7e2f99c0d63b368ed8a8ee6b41f62 (diff)
glusterd/snapshot: Correct the error message when the snapshot name is
more than 255 characters Change-Id: Iaab6889a86ab39fa73eebf30dc08af98d5a774bc BUG: 1078166 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/7296 Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Rajesh Joseph <rjoseph@redhat.com>
-rw-r--r--cli/src/cli-cmd-parser.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 0a2bb53..d25bf45 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -2847,7 +2847,7 @@ cli_snap_create_parse (dict_t *dict, const char **words, int wordcount,
if (strlen(words[cmdi]) >= GLUSTERD_MAX_SNAP_NAME) {
cli_err ("snapshot create: failed: snapname cannot exceed "
- "256 characters.");
+ "255 characters.");
gf_log ("cli", GF_LOG_ERROR, "Snapname too long");
goto out;
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 5759bde..1115dda 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -2245,7 +2245,7 @@ glusterd_handle_snapshot_create (rpcsvc_request_t *req, glusterd_op_t op,
}
if (strlen(snapname) >= GLUSTERD_MAX_SNAP_NAME) {
- snprintf (err_str, len, "Snapshot name too long");
+ snprintf (err_str, len,"snapname cannot exceed 255 characters");
gf_log (this->name, GF_LOG_ERROR, "%s", err_str);
ret = -1;
goto out;