diff options
Diffstat (limited to 'rpc/block_clnt.c')
-rw-r--r-- | rpc/block_clnt.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/rpc/block_clnt.c b/rpc/block_clnt.c index 9e5b585..ae95d9a 100644 --- a/rpc/block_clnt.c +++ b/rpc/block_clnt.c @@ -9,15 +9,30 @@ /* Default timeout can be changed using clnt_control() */ static struct timeval TIMEOUT = { 25, 0 }; -blockTrans * -block_exec_1(char **argp, CLIENT *clnt) +blockResponse * +block_create_cli_1(blockCreateCli *argp, CLIENT *clnt) { - static blockTrans clnt_res; + static blockResponse clnt_res; memset((char *)&clnt_res, 0, sizeof(clnt_res)); - if (clnt_call (clnt, BLOCK_EXEC, - (xdrproc_t) xdr_wrapstring, (caddr_t) argp, - (xdrproc_t) xdr_blockTrans, (caddr_t) &clnt_res, + if (clnt_call (clnt, BLOCK_CREATE_CLI, + (xdrproc_t) xdr_blockCreateCli, (caddr_t) argp, + (xdrproc_t) xdr_blockResponse, (caddr_t) &clnt_res, + TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +} + +blockResponse * +block_create_1(blockCreate *argp, CLIENT *clnt) +{ + static blockResponse clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); + if (clnt_call (clnt, BLOCK_CREATE, + (xdrproc_t) xdr_blockCreate, (caddr_t) argp, + (xdrproc_t) xdr_blockResponse, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } |