From f0f3b040dfa062021d3a193e5a19c380eb5e908d Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 29 Aug 2011 17:53:24 +0530 Subject: modify to the way we used XDR definitions files (.x files) Earlier: step 1: copy the existing .x files to /tmp step 2: generate '.[ch]' files using 'rpcgen .x' step 3: check diff with the to the existing files, add only your part of changes back to the original file. (ignore other changes). step 4: there is another file to write wrapper functions to convert structures to/from XDR buffers, update it with your new structure. step 5: use these wrapper functions in the newly written procedures. step 6: commit :-| Now: step 1: update (mostly adding only) the .x file step 2: run '/extras/generate-xdr-files.sh .x' command step 3: implement rpc procedure to handle the request/response. step 4: commit :-) Change-Id: I219f9159fc980438c86e847c6b030be96e595ea2 BUG: 3488 Reviewed-on: http://review.gluster.com/341 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- rpc/xdr/src/glusterd1-xdr.c | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) (limited to 'rpc/xdr/src/glusterd1-xdr.c') diff --git a/rpc/xdr/src/glusterd1-xdr.c b/rpc/xdr/src/glusterd1-xdr.c index c0fc0029b..97f84b294 100644 --- a/rpc/xdr/src/glusterd1-xdr.c +++ b/rpc/xdr/src/glusterd1-xdr.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2010-2011 Gluster, Inc. + Copyright (c) 2007-2011 Gluster, Inc. This file is part of GlusterFS. GlusterFS is free software; you can redistribute it and/or modify @@ -17,17 +17,20 @@ . */ +#include "xdr-common.h" + /* * Please do not edit this file. * It was generated using rpcgen. */ #include "glusterd1-xdr.h" -#include "compat.h" bool_t xdr_glusterd_volume_status (XDR *xdrs, glusterd_volume_status *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_enum (xdrs, (enum_t *) objp)) return FALSE; @@ -37,6 +40,8 @@ xdr_glusterd_volume_status (XDR *xdrs, glusterd_volume_status *objp) bool_t xdr_gd1_mgmt_probe_req (XDR *xdrs, gd1_mgmt_probe_req *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -51,6 +56,8 @@ xdr_gd1_mgmt_probe_req (XDR *xdrs, gd1_mgmt_probe_req *objp) bool_t xdr_gd1_mgmt_probe_rsp (XDR *xdrs, gd1_mgmt_probe_rsp *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -69,6 +76,8 @@ xdr_gd1_mgmt_probe_rsp (XDR *xdrs, gd1_mgmt_probe_rsp *objp) bool_t xdr_gd1_mgmt_friend_req (XDR *xdrs, gd1_mgmt_friend_req *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -85,6 +94,8 @@ xdr_gd1_mgmt_friend_req (XDR *xdrs, gd1_mgmt_friend_req *objp) bool_t xdr_gd1_mgmt_friend_rsp (XDR *xdrs, gd1_mgmt_friend_rsp *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -103,6 +114,8 @@ xdr_gd1_mgmt_friend_rsp (XDR *xdrs, gd1_mgmt_friend_rsp *objp) bool_t xdr_gd1_mgmt_unfriend_req (XDR *xdrs, gd1_mgmt_unfriend_req *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -117,6 +130,8 @@ xdr_gd1_mgmt_unfriend_req (XDR *xdrs, gd1_mgmt_unfriend_req *objp) bool_t xdr_gd1_mgmt_unfriend_rsp (XDR *xdrs, gd1_mgmt_unfriend_rsp *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -135,6 +150,8 @@ xdr_gd1_mgmt_unfriend_rsp (XDR *xdrs, gd1_mgmt_unfriend_rsp *objp) bool_t xdr_gd1_mgmt_cluster_lock_req (XDR *xdrs, gd1_mgmt_cluster_lock_req *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -145,6 +162,8 @@ xdr_gd1_mgmt_cluster_lock_req (XDR *xdrs, gd1_mgmt_cluster_lock_req *objp) bool_t xdr_gd1_mgmt_cluster_lock_rsp (XDR *xdrs, gd1_mgmt_cluster_lock_rsp *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -159,6 +178,8 @@ xdr_gd1_mgmt_cluster_lock_rsp (XDR *xdrs, gd1_mgmt_cluster_lock_rsp *objp) bool_t xdr_gd1_mgmt_cluster_unlock_req (XDR *xdrs, gd1_mgmt_cluster_unlock_req *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -169,6 +190,8 @@ xdr_gd1_mgmt_cluster_unlock_req (XDR *xdrs, gd1_mgmt_cluster_unlock_req *objp) bool_t xdr_gd1_mgmt_cluster_unlock_rsp (XDR *xdrs, gd1_mgmt_cluster_unlock_rsp *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -183,6 +206,8 @@ xdr_gd1_mgmt_cluster_unlock_rsp (XDR *xdrs, gd1_mgmt_cluster_unlock_rsp *objp) bool_t xdr_gd1_mgmt_stage_op_req (XDR *xdrs, gd1_mgmt_stage_op_req *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -197,8 +222,9 @@ xdr_gd1_mgmt_stage_op_req (XDR *xdrs, gd1_mgmt_stage_op_req *objp) bool_t xdr_gd1_mgmt_stage_op_rsp (XDR *xdrs, gd1_mgmt_stage_op_rsp *objp) { + register int32_t *buf; + buf = NULL; - register int32_t *buf; if (xdrs->x_op == XDR_ENCODE) { if (!xdr_vector (xdrs, (char *)objp->uuid, 16, @@ -267,6 +293,8 @@ xdr_gd1_mgmt_stage_op_rsp (XDR *xdrs, gd1_mgmt_stage_op_rsp *objp) bool_t xdr_gd1_mgmt_commit_op_req (XDR *xdrs, gd1_mgmt_commit_op_req *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -282,6 +310,7 @@ bool_t xdr_gd1_mgmt_commit_op_rsp (XDR *xdrs, gd1_mgmt_commit_op_rsp *objp) { register int32_t *buf; + buf = NULL; if (xdrs->x_op == XDR_ENCODE) { @@ -351,6 +380,8 @@ xdr_gd1_mgmt_commit_op_rsp (XDR *xdrs, gd1_mgmt_commit_op_rsp *objp) bool_t xdr_gd1_mgmt_friend_update (XDR *xdrs, gd1_mgmt_friend_update *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -365,6 +396,8 @@ xdr_gd1_mgmt_friend_update (XDR *xdrs, gd1_mgmt_friend_update *objp) bool_t xdr_gd1_mgmt_friend_update_rsp (XDR *xdrs, gd1_mgmt_friend_update_rsp *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_vector (xdrs, (char *)objp->uuid, 16, sizeof (u_char), (xdrproc_t) xdr_u_char)) @@ -381,6 +414,8 @@ xdr_gd1_mgmt_friend_update_rsp (XDR *xdrs, gd1_mgmt_friend_update_rsp *objp) bool_t xdr_gd1_mgmt_brick_op_req (XDR *xdrs, gd1_mgmt_brick_op_req *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_string (xdrs, &objp->name, ~0)) return FALSE; @@ -394,6 +429,8 @@ xdr_gd1_mgmt_brick_op_req (XDR *xdrs, gd1_mgmt_brick_op_req *objp) bool_t xdr_gd1_mgmt_brick_op_rsp (XDR *xdrs, gd1_mgmt_brick_op_rsp *objp) { + register int32_t *buf; + buf = NULL; if (!xdr_int (xdrs, &objp->op_ret)) return FALSE; -- cgit