From 970b22e377e20408df8646cdc61a968b55c145b1 Mon Sep 17 00:00:00 2001 From: Pranith K Date: Thu, 10 Mar 2011 02:19:20 +0000 Subject: rpc/xdr: Add gluster profile and brick op structures Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1965 (need a cmd to get io-stat details) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1965 --- rpc/xdr/src/cli1-xdr.c | 90 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 26 deletions(-) (limited to 'rpc/xdr/src/cli1-xdr.c') diff --git a/rpc/xdr/src/cli1-xdr.c b/rpc/xdr/src/cli1-xdr.c index d9640f5b0..8e9395a52 100644 --- a/rpc/xdr/src/cli1-xdr.c +++ b/rpc/xdr/src/cli1-xdr.c @@ -23,7 +23,7 @@ * It was generated using rpcgen. */ -#include "cli1.h" +#include "cli1-xdr.h" #include "compat.h" bool_t @@ -83,9 +83,19 @@ xdr_gf1_cli_op_flags (XDR *xdrs, gf1_cli_op_flags *objp) bool_t xdr_gf1_cli_gsync_set (XDR *xdrs, gf1_cli_gsync_set *objp) { - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; + + if (!xdr_enum (xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf1_cli_stats_op (XDR *xdrs, gf1_cli_stats_op *objp) +{ + + if (!xdr_enum (xdrs, (enum_t *) objp)) + return FALSE; + return TRUE; } bool_t @@ -674,31 +684,59 @@ xdr_gf1_cli_fsm_log_rsp (XDR *xdrs, gf1_cli_fsm_log_rsp *objp) bool_t xdr_gf1_cli_gsync_set_req (XDR *xdrs, gf1_cli_gsync_set_req *objp) { - if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - return TRUE; + + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + return TRUE; } bool_t xdr_gf1_cli_gsync_set_rsp (XDR *xdrs, gf1_cli_gsync_set_rsp *objp) { - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->op_errstr, ~0)) - return FALSE; - if (!xdr_int (xdrs, &objp->type)) - return FALSE; - if (!xdr_int (xdrs, &objp->config_type)) - return FALSE; - if (!xdr_string (xdrs, &objp->op_name, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->master, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->slave, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->gsync_prefix, ~0)) - return FALSE; - return TRUE; + + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_string (xdrs, &objp->op_errstr, ~0)) + return FALSE; + if (!xdr_int (xdrs, &objp->type)) + return FALSE; + if (!xdr_int (xdrs, &objp->config_type)) + return FALSE; + if (!xdr_string (xdrs, &objp->op_name, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->master, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->slave, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->gsync_prefix, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf1_cli_stats_volume_req (XDR *xdrs, gf1_cli_stats_volume_req *objp) +{ + + if (!xdr_string (xdrs, &objp->volname, ~0)) + return FALSE; + if (!xdr_gf1_cli_stats_op (xdrs, &objp->op)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf1_cli_stats_volume_rsp (XDR *xdrs, gf1_cli_stats_volume_rsp *objp) +{ + + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_string (xdrs, &objp->op_errstr, ~0)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->stats_info.stats_info_val, (u_int *) &objp->stats_info.stats_info_len, ~0)) + return FALSE; + return TRUE; } -- cgit