From: Ronnie Sahlberg Date: Wed, 6 Nov 2013 01:40:31 +0000 (-0800) Subject: Remove some residuals from the nlm.c->nsm.c copy X-Git-Tag: upstream/1.9.6^2~173 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9096d370e7dac2090f3139ca2198b5912192962e;hp=ed09b5676fde3acf65c817f9a77d8db479d3bac8;p=deb_libnfs.git Remove some residuals from the nlm.c->nsm.c copy --- diff --git a/nsm/nsm.c b/nsm/nsm.c index 591beb2..641f787 100644 --- a/nsm/nsm.c +++ b/nsm/nsm.c @@ -46,108 +46,6 @@ int rpc_nsm1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data) return 0; } -#if 0 -int rpc_nlm4_test_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_TESTargs *args, void *private_data) -{ - struct rpc_pdu *pdu; - - pdu = rpc_allocate_pdu(rpc, NLM_PROGRAM, NLM_V4, NLM4_TEST, cb, private_data, (zdrproc_t)zdr_NLM4_TESTres, sizeof(NLM4_TESTres)); - if (pdu == NULL) { - rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for nlm/test call"); - return -1; - } - - if (zdr_NLM4_TESTargs(&pdu->zdr, args) == 0) { - rpc_set_error(rpc, "ZDR error: Failed to encode NLM4_TESTargs"); - rpc_free_pdu(rpc, pdu); - return -2; - } - - if (rpc_queue_pdu(rpc, pdu) != 0) { - rpc_set_error(rpc, "Out of memory. Failed to queue pdu for nlm/test call"); - rpc_free_pdu(rpc, pdu); - return -1; - } - - return 0; -} - -int rpc_nlm4_lock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_LOCKargs *args, void *private_data) -{ - struct rpc_pdu *pdu; - - pdu = rpc_allocate_pdu(rpc, NLM_PROGRAM, NLM_V4, NLM4_LOCK, cb, private_data, (zdrproc_t)zdr_NLM4_LOCKres, sizeof(NLM4_LOCKres)); - if (pdu == NULL) { - rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for nlm/lock call"); - return -1; - } - - if (zdr_NLM4_LOCKargs(&pdu->zdr, args) == 0) { - rpc_set_error(rpc, "ZDR error: Failed to encode NLM4_LOCKargs"); - rpc_free_pdu(rpc, pdu); - return -2; - } - - if (rpc_queue_pdu(rpc, pdu) != 0) { - rpc_set_error(rpc, "Out of memory. Failed to queue pdu for nlm/lock call"); - rpc_free_pdu(rpc, pdu); - return -1; - } - - return 0; -} - -int rpc_nlm4_cancel_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_CANCargs *args, void *private_data) -{ - struct rpc_pdu *pdu; - - pdu = rpc_allocate_pdu(rpc, NLM_PROGRAM, NLM_V4, NLM4_CANCEL, cb, private_data, (zdrproc_t)zdr_NLM4_CANCres, sizeof(NLM4_CANCres)); - if (pdu == NULL) { - rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for nlm/cancel call"); - return -1; - } - - if (zdr_NLM4_CANCargs(&pdu->zdr, args) == 0) { - rpc_set_error(rpc, "ZDR error: Failed to encode NLM4_CANCargs"); - rpc_free_pdu(rpc, pdu); - return -2; - } - - if (rpc_queue_pdu(rpc, pdu) != 0) { - rpc_set_error(rpc, "Out of memory. Failed to queue pdu for nlm/cancel call"); - rpc_free_pdu(rpc, pdu); - return -1; - } - - return 0; -} - -int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data) -{ - struct rpc_pdu *pdu; - - pdu = rpc_allocate_pdu(rpc, NLM_PROGRAM, NLM_V4, NLM4_UNLOCK, cb, private_data, (zdrproc_t)zdr_NLM4_UNLOCKres, sizeof(NLM4_UNLOCKres)); - if (pdu == NULL) { - rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for nlm/unlock call"); - return -1; - } - - if (zdr_NLM4_UNLOCKargs(&pdu->zdr, args) == 0) { - rpc_set_error(rpc, "ZDR error: Failed to encode NLM4_UNLOCKargs"); - rpc_free_pdu(rpc, pdu); - return -2; - } - - if (rpc_queue_pdu(rpc, pdu) != 0) { - rpc_set_error(rpc, "Out of memory. Failed to queue pdu for nlm/unlock call"); - rpc_free_pdu(rpc, pdu); - return -1; - } - - return 0; -} -#endif - char *nsmstat1_to_str(int st) { enum nsmstat1 stat = st;