X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=rquota%2Frquota.c;h=ec19d6149e299f15bb3a6e6981067d93396bea1d;hb=0672f75b57b9e0fbf56079944fde5b2fc9de27be;hp=55919d54eb035215a8f7d5416cd17648097bc2e0;hpb=eecdc4f3cd5c464ae02823a823993e720664e465;p=deb_libnfs.git diff --git a/rquota/rquota.c b/rquota/rquota.c index 55919d5..ec19d61 100644 --- a/rquota/rquota.c +++ b/rquota/rquota.c @@ -14,16 +14,14 @@ You should have received a copy of the GNU Lesser General Public License along with this program; if not, see . */ - -#if defined(WIN32) -#include -#endif +#ifdef WIN32 +#include "win32_compat.h" +#endif/*WIN32*/ #include #include #include -#include -#include +#include "libnfs-zdr.h" #include "libnfs.h" #include "libnfs-raw.h" #include "libnfs-private.h" @@ -56,7 +54,7 @@ int rpc_rquota1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_dat { struct rpc_pdu *pdu; - pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_NULL, cb, private_data, (xdrproc_t)xdr_void, 0); + pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_NULL, cb, private_data, (zdrproc_t)zdr_void, 0); if (pdu == NULL) { rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota1/null call"); return -1; @@ -76,7 +74,7 @@ int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *export, struct rpc_pdu *pdu; GETQUOTA1args args; - pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_GETQUOTA, cb, private_data, (xdrproc_t)xdr_GETQUOTA1res, sizeof(GETQUOTA1res)); + pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_GETQUOTA, cb, private_data, (zdrproc_t)zdr_GETQUOTA1res, sizeof(GETQUOTA1res)); if (pdu == NULL) { rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota1/getquota call"); return -1; @@ -85,8 +83,8 @@ int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *export, args.export = export; args.uid = uid; - if (xdr_GETQUOTA1args(&pdu->xdr, &args) == 0) { - rpc_set_error(rpc, "XDR error: Failed to encode GETQUOTA1args"); + if (zdr_GETQUOTA1args(&pdu->zdr, &args) == 0) { + rpc_set_error(rpc, "ZDR error: Failed to encode GETQUOTA1args"); rpc_free_pdu(rpc, pdu); return -2; } @@ -105,7 +103,7 @@ int rpc_rquota1_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *e struct rpc_pdu *pdu; GETQUOTA1args args; - pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_GETACTIVEQUOTA, cb, private_data, (xdrproc_t)xdr_GETQUOTA1res, sizeof(GETQUOTA1res)); + pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_GETACTIVEQUOTA, cb, private_data, (zdrproc_t)zdr_GETQUOTA1res, sizeof(GETQUOTA1res)); if (pdu == NULL) { rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota1/getactivequota call"); return -1; @@ -114,8 +112,8 @@ int rpc_rquota1_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *e args.export = export; args.uid = uid; - if (xdr_GETQUOTA1args(&pdu->xdr, &args) == 0) { - rpc_set_error(rpc, "XDR error: Failed to encode GETQUOTA1args"); + if (zdr_GETQUOTA1args(&pdu->zdr, &args) == 0) { + rpc_set_error(rpc, "ZDR error: Failed to encode GETQUOTA1args"); rpc_free_pdu(rpc, pdu); return -2; } @@ -134,7 +132,7 @@ int rpc_rquota2_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_dat { struct rpc_pdu *pdu; - pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_NULL, cb, private_data, (xdrproc_t)xdr_void, 0); + pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_NULL, cb, private_data, (zdrproc_t)zdr_void, 0); if (pdu == NULL) { rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota2/null call"); return -1; @@ -154,7 +152,7 @@ int rpc_rquota2_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *export, struct rpc_pdu *pdu; GETQUOTA2args args; - pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_GETQUOTA, cb, private_data, (xdrproc_t)xdr_GETQUOTA1res, sizeof(GETQUOTA1res)); + pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_GETQUOTA, cb, private_data, (zdrproc_t)zdr_GETQUOTA1res, sizeof(GETQUOTA1res)); if (pdu == NULL) { rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota2/getquota call"); return -1; @@ -164,8 +162,8 @@ int rpc_rquota2_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *export, args.type = type; args.uid = uid; - if (xdr_GETQUOTA2args(&pdu->xdr, &args) == 0) { - rpc_set_error(rpc, "XDR error: Failed to encode GETQUOTA2args"); + if (zdr_GETQUOTA2args(&pdu->zdr, &args) == 0) { + rpc_set_error(rpc, "ZDR error: Failed to encode GETQUOTA2args"); rpc_free_pdu(rpc, pdu); return -2; } @@ -184,7 +182,7 @@ int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *e struct rpc_pdu *pdu; GETQUOTA2args args; - pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_GETACTIVEQUOTA, cb, private_data, (xdrproc_t)xdr_GETQUOTA1res, sizeof(GETQUOTA1res)); + pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_GETACTIVEQUOTA, cb, private_data, (zdrproc_t)zdr_GETQUOTA1res, sizeof(GETQUOTA1res)); if (pdu == NULL) { rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota2/getactivequota call"); return -1; @@ -194,8 +192,8 @@ int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *e args.type = type; args.uid = uid; - if (xdr_GETQUOTA2args(&pdu->xdr, &args) == 0) { - rpc_set_error(rpc, "XDR error: Failed to encode GETQUOTA2args"); + if (zdr_GETQUOTA2args(&pdu->zdr, &args) == 0) { + rpc_set_error(rpc, "ZDR error: Failed to encode GETQUOTA2args"); rpc_free_pdu(rpc, pdu); return -2; }