From 9819fcedf10f1430d4969c86e6df4dfe975b7dcf Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 22 Apr 2014 13:27:35 -0700 Subject: rpcgen: Remove autogenerated files instead build on demand Avoid modifying autogenerated files and keeping them in repository - autogenerate them on demand from ".x" files Change-Id: I2cdb1fe9b99768ceb80a8cb100fa00bd1d8fe2c6 BUG: 1090807 Signed-off-by: Harshavardhana Reviewed-on: http://review.gluster.org/7526 Tested-by: Gluster Build System Reviewed-by: Niels de Vos Reviewed-by: Anand Avati --- xlators/nfs/server/src/acl3.h | 5 +++++ xlators/nfs/server/src/nlm4.c | 45 ++++++++++++++++++------------------- xlators/nfs/server/src/nlm4.h | 26 +++++++++++++++++++++ xlators/nfs/server/src/nlmcbk_svc.c | 1 - 4 files changed, 53 insertions(+), 24 deletions(-) (limited to 'xlators/nfs/server') diff --git a/xlators/nfs/server/src/acl3.h b/xlators/nfs/server/src/acl3.h index 03d626f3e..220bc9e78 100644 --- a/xlators/nfs/server/src/acl3.h +++ b/xlators/nfs/server/src/acl3.h @@ -13,6 +13,11 @@ #include "glusterfs-acl.h" +#define ACL3_NULL 0 +#define ACL3_GETACL 1 +#define ACL3_SETACL 2 +#define ACL3_PROC_COUNT 3 + #define GF_ACL3_PORT 38469 #define GF_ACL GF_NFS"-ACL" diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c index d0caa97c2..042cfeba1 100644 --- a/xlators/nfs/server/src/nlm4.c +++ b/xlators/nfs/server/src/nlm4.c @@ -33,7 +33,6 @@ #include "nfs-generics.h" #include "rpc-clnt.h" #include "nsm-xdr.h" -#include "nlmcbk-xdr.h" #include "run.h" #include #include @@ -157,9 +156,9 @@ nlm4_prep_nlm4_testargs (nlm4_testargs *args, struct nfs3_fh *fh, nlm4_lkowner_t *oh, char *cookiebytes) { memset (args, 0, sizeof (*args)); - args->alock.fh.n_bytes = (void *)fh; - args->alock.oh.n_bytes = (void *)oh; - args->cookie.n_bytes = (void *)cookiebytes; + args->alock.fh.nlm4_netobj_val = (void *)fh; + args->alock.oh.nlm4_netobj_val = (void *)oh; + args->cookie.nlm4_netobj_val = (void *)cookiebytes; } void @@ -167,9 +166,9 @@ nlm4_prep_nlm4_lockargs (nlm4_lockargs *args, struct nfs3_fh *fh, nlm4_lkowner_t *oh, char *cookiebytes) { memset (args, 0, sizeof (*args)); - args->alock.fh.n_bytes = (void *)fh; - args->alock.oh.n_bytes = (void *)oh; - args->cookie.n_bytes = (void *)cookiebytes; + args->alock.fh.nlm4_netobj_val = (void *)fh; + args->alock.oh.nlm4_netobj_val = (void *)oh; + args->cookie.nlm4_netobj_val = (void *)cookiebytes; } void @@ -177,9 +176,9 @@ nlm4_prep_nlm4_cancargs (nlm4_cancargs *args, struct nfs3_fh *fh, nlm4_lkowner_t *oh, char *cookiebytes) { memset (args, 0, sizeof (*args)); - args->alock.fh.n_bytes = (void *)fh; - args->alock.oh.n_bytes = (void *)oh; - args->cookie.n_bytes = (void *)cookiebytes; + args->alock.fh.nlm4_netobj_val = (void *)fh; + args->alock.oh.nlm4_netobj_val = (void *)oh; + args->cookie.nlm4_netobj_val = (void *)cookiebytes; } void @@ -187,9 +186,9 @@ nlm4_prep_nlm4_unlockargs (nlm4_unlockargs *args, struct nfs3_fh *fh, nlm4_lkowner_t *oh, char *cookiebytes) { memset (args, 0, sizeof (*args)); - args->alock.fh.n_bytes = (void *)fh; - args->alock.oh.n_bytes = (void *)oh; - args->cookie.n_bytes = (void *)cookiebytes; + args->alock.fh.nlm4_netobj_val = (void *)fh; + args->alock.oh.nlm4_netobj_val = (void *)oh; + args->cookie.nlm4_netobj_val = (void *)cookiebytes; } void @@ -197,9 +196,9 @@ nlm4_prep_shareargs (nlm4_shareargs *args, struct nfs3_fh *fh, nlm4_lkowner_t *oh, char *cookiebytes) { memset (args, 0, sizeof (*args)); - args->share.fh.n_bytes = (void *)fh; - args->share.oh.n_bytes = (void *)oh; - args->cookie.n_bytes = (void *)cookiebytes; + args->share.fh.nlm4_netobj_val = (void *)fh; + args->share.oh.nlm4_netobj_val = (void *)oh; + args->cookie.nlm4_netobj_val = (void *)cookiebytes; } void @@ -210,22 +209,22 @@ nlm4_prep_freeallargs (nlm4_freeallargs *args, nlm4_lkowner_t *oh) } void -nlm_copy_lkowner (gf_lkowner_t *dst, netobj *src) +nlm_copy_lkowner (gf_lkowner_t *dst, nlm4_netobj *src) { - dst->len = src->n_len; - memcpy (dst->data, src->n_bytes, dst->len); + dst->len = src->nlm4_netobj_len; + memcpy (dst->data, src->nlm4_netobj_val, dst->len); } int -nlm_is_oh_same_lkowner (gf_lkowner_t *a, netobj *b) +nlm_is_oh_same_lkowner (gf_lkowner_t *a, nlm4_netobj *b) { if (!a || !b) { gf_log (GF_NLM, GF_LOG_ERROR, "invalid args"); return -1; } - return (a->len == b->n_len && - !memcmp (a->data, b->n_bytes, a->len)); + return (a->len == b->nlm4_netobj_len && + !memcmp (a->data, b->nlm4_netobj_val, a->len)); } nlm4_stats @@ -653,7 +652,7 @@ err: } int -nlm4_generic_reply (rpcsvc_request_t *req, netobj cookie, nlm4_stats stat) +nlm4_generic_reply (rpcsvc_request_t *req, nlm4_netobj cookie, nlm4_stats stat) { nlm4_res res; diff --git a/xlators/nfs/server/src/nlm4.h b/xlators/nfs/server/src/nlm4.h index 5b6296110..e234b6944 100644 --- a/xlators/nfs/server/src/nlm4.h +++ b/xlators/nfs/server/src/nlm4.h @@ -31,6 +31,32 @@ #include "nlm4-xdr.h" #include "lkowner.h" +#define NLM4_NULL 0 +#define NLM4_TEST 1 +#define NLM4_LOCK 2 +#define NLM4_CANCEL 3 +#define NLM4_UNLOCK 4 +#define NLM4_GRANTED 5 +#define NLM4_TEST_MSG 6 +#define NLM4_LOCK_MSG 7 +#define NLM4_CANCEL_MSG 8 +#define NLM4_UNLOCK_MSG 9 +#define NLM4_GRANTED_MSG 10 +#define NLM4_TEST_RES 11 +#define NLM4_LOCK_RES 12 +#define NLM4_CANCEL_RES 13 +#define NLM4_UNLOCK_RES 14 +#define NLM4_GRANTED_RES 15 +#define NLM4_SM_NOTIFY 16 +#define NLM4_SEVENTEEN 17 +#define NLM4_EIGHTEEN 18 +#define NLM4_NINETEEN 19 +#define NLM4_SHARE 20 +#define NLM4_UNSHARE 21 +#define NLM4_NM_LOCK 22 +#define NLM4_FREE_ALL 23 +#define NLM4_PROC_COUNT 24 + /* Registered with portmap */ #define GF_NLM4_PORT 38468 #define GF_NLM GF_NFS"-NLM" diff --git a/xlators/nfs/server/src/nlmcbk_svc.c b/xlators/nfs/server/src/nlmcbk_svc.c index e1b588765..20d3728d0 100644 --- a/xlators/nfs/server/src/nlmcbk_svc.c +++ b/xlators/nfs/server/src/nlmcbk_svc.c @@ -13,7 +13,6 @@ * It was generated using rpcgen. */ -#include "nlmcbk-xdr.h" #include "nlm4.h" #include "logging.h" #include -- cgit