summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-09-13 07:54:30 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-13 06:58:16 -0700
commita13bc5aab51ae0e03721c48c8eb98b08c6137872 (patch)
tree425b4a55ce3bec572713139733dd773ec0814586 /rpc
parent47a0854524123c21ef1a40d4f33c5593eb586565 (diff)
Print error msg to the CLI from glusterd
Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1180 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1180
Diffstat (limited to 'rpc')
-rw-r--r--rpc/xdr/src/glusterd1-xdr.c9
-rw-r--r--rpc/xdr/src/glusterd1-xdr.h2
-rw-r--r--rpc/xdr/src/glusterd1.x2
3 files changed, 13 insertions, 0 deletions
diff --git a/rpc/xdr/src/glusterd1-xdr.c b/rpc/xdr/src/glusterd1-xdr.c
index 3ddd5568826..7c9038dcfc4 100644
--- a/rpc/xdr/src/glusterd1-xdr.c
+++ b/rpc/xdr/src/glusterd1-xdr.c
@@ -201,6 +201,8 @@ xdr_gd1_mgmt_stage_op_rsp (XDR *xdrs, gd1_mgmt_stage_op_rsp *objp)
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
return FALSE;
+ if (!xdr_string (xdrs, &objp->op_errstr, ~0))
+ return FALSE;
return TRUE;
}
@@ -235,6 +237,8 @@ xdr_gd1_mgmt_commit_op_rsp (XDR *xdrs, gd1_mgmt_commit_op_rsp *objp)
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
return FALSE;
+ if (!xdr_string (xdrs, &objp->op_errstr, ~0))
+ return FALSE;
} else {
IXDR_PUT_LONG(buf, objp->op);
@@ -256,6 +260,8 @@ xdr_gd1_mgmt_commit_op_rsp (XDR *xdrs, gd1_mgmt_commit_op_rsp *objp)
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
return FALSE;
+ if (!xdr_string (xdrs, &objp->op_errstr, ~0))
+ return FALSE;
} else {
objp->op = IXDR_GET_LONG(buf);
@@ -278,6 +284,9 @@ xdr_gd1_mgmt_commit_op_rsp (XDR *xdrs, gd1_mgmt_commit_op_rsp *objp)
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
return FALSE;
+ if (!xdr_string (xdrs, &objp->op_errstr, ~0))
+ return FALSE;
+
return TRUE;
}
diff --git a/rpc/xdr/src/glusterd1-xdr.h b/rpc/xdr/src/glusterd1-xdr.h
index 0c738d00c3e..fe7c44eb29f 100644
--- a/rpc/xdr/src/glusterd1-xdr.h
+++ b/rpc/xdr/src/glusterd1-xdr.h
@@ -130,6 +130,7 @@ struct gd1_mgmt_stage_op_rsp {
int op;
int op_ret;
int op_errno;
+ char *op_errstr;
};
typedef struct gd1_mgmt_stage_op_rsp gd1_mgmt_stage_op_rsp;
@@ -152,6 +153,7 @@ struct gd1_mgmt_commit_op_rsp {
u_int dict_len;
char *dict_val;
} dict;
+ char *op_errstr;
};
typedef struct gd1_mgmt_commit_op_rsp gd1_mgmt_commit_op_rsp;
diff --git a/rpc/xdr/src/glusterd1.x b/rpc/xdr/src/glusterd1.x
index 19fa7af688b..a4f7b8558f7 100644
--- a/rpc/xdr/src/glusterd1.x
+++ b/rpc/xdr/src/glusterd1.x
@@ -77,6 +77,7 @@ struct gd1_mgmt_stage_op_rsp {
int op;
int op_ret;
int op_errno;
+ string op_errstr<>;
} ;
struct gd1_mgmt_commit_op_req {
@@ -91,6 +92,7 @@ struct gd1_mgmt_commit_op_rsp {
int op;
int op_ret;
int op_errno;
+ string op_errstr<>;
} ;
struct gd1_mgmt_friend_update {