From d42f248c58b2ca73fb56a3e091c8e967e2435546 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 22 Sep 2010 04:21:02 +0000 Subject: mgmt/glusterd: replace-brick validations Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1657 (validations for replace-brick while stage op) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1657 --- rpc/xdr/src/cli1-xdr.c | 4 +++- rpc/xdr/src/cli1-xdr.h | 1 + rpc/xdr/src/cli1.x | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'rpc') diff --git a/rpc/xdr/src/cli1-xdr.c b/rpc/xdr/src/cli1-xdr.c index 93f7e7681..ca2bc09f3 100644 --- a/rpc/xdr/src/cli1-xdr.c +++ b/rpc/xdr/src/cli1-xdr.c @@ -94,7 +94,7 @@ bool_t xdr_gf1_cli_probe_rsp (XDR *xdrs, gf1_cli_probe_rsp *objp) { - register int32_t *buf; + register int32_t *buf; if (xdrs->x_op == XDR_ENCODE) { buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); @@ -452,6 +452,8 @@ xdr_gf1_cli_replace_brick_rsp (XDR *xdrs, gf1_cli_replace_brick_rsp *objp) return FALSE; if (!xdr_int (xdrs, &objp->op_errno)) return FALSE; + if (!xdr_string (xdrs, &objp->op_errstr, ~0)) + return FALSE; if (!xdr_string (xdrs, &objp->volname, ~0)) return FALSE; if (!xdr_string (xdrs, &objp->status, ~0)) diff --git a/rpc/xdr/src/cli1-xdr.h b/rpc/xdr/src/cli1-xdr.h index c6d8e8bf5..0225acefe 100644 --- a/rpc/xdr/src/cli1-xdr.h +++ b/rpc/xdr/src/cli1-xdr.h @@ -275,6 +275,7 @@ typedef struct gf1_cli_replace_brick_req gf1_cli_replace_brick_req; struct gf1_cli_replace_brick_rsp { int op_ret; int op_errno; + char *op_errstr; char *volname; char *status; }; diff --git a/rpc/xdr/src/cli1.x b/rpc/xdr/src/cli1.x index 3f37f6d75..ba4288be5 100644 --- a/rpc/xdr/src/cli1.x +++ b/rpc/xdr/src/cli1.x @@ -188,6 +188,7 @@ struct gf1_cli_get_vol_rsp { struct gf1_cli_replace_brick_rsp { int op_ret; int op_errno; + string op_errstr<>; string volname<>; string status<>; } ; -- cgit