diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-01-21 15:08:50 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-01-30 19:31:50 +0530 |
commit | 7857ef74633919b8213009b411b0840eee144c97 (patch) | |
tree | 6d9fcf88b321b8b1011cd9d4053f20e004b7151c /rpc/block_clnt.c | |
parent | 683b6ba3f17a9bbf876c66f5d4b7a9d573d8853f (diff) |
gluster-block: add delete rpc
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'rpc/block_clnt.c')
-rw-r--r-- | rpc/block_clnt.c | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/rpc/block_clnt.c b/rpc/block_clnt.c index ae95d9a..2e96709 100644 --- a/rpc/block_clnt.c +++ b/rpc/block_clnt.c @@ -25,6 +25,51 @@ block_create_cli_1(blockCreateCli *argp, CLIENT *clnt) } blockResponse * +block_list_cli_1(blockListCli *argp, CLIENT *clnt) +{ + static blockResponse clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); + if (clnt_call (clnt, BLOCK_LIST_CLI, + (xdrproc_t) xdr_blockListCli, (caddr_t) argp, + (xdrproc_t) xdr_blockResponse, (caddr_t) &clnt_res, + TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +} + +blockResponse * +block_info_cli_1(blockInfoCli *argp, CLIENT *clnt) +{ + static blockResponse clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); + if (clnt_call (clnt, BLOCK_INFO_CLI, + (xdrproc_t) xdr_blockInfoCli, (caddr_t) argp, + (xdrproc_t) xdr_blockResponse, (caddr_t) &clnt_res, + TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +} + +blockResponse * +block_delete_cli_1(blockDeleteCli *argp, CLIENT *clnt) +{ + static blockResponse clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); + if (clnt_call (clnt, BLOCK_DELETE_CLI, + (xdrproc_t) xdr_blockDeleteCli, (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; @@ -38,3 +83,33 @@ block_create_1(blockCreate *argp, CLIENT *clnt) } return (&clnt_res); } + +blockResponse * +block_delete_1(blockDelete *argp, CLIENT *clnt) +{ + static blockResponse clnt_res; + + memset((char *)&clnt_res, 0, sizeof(clnt_res)); + if (clnt_call (clnt, BLOCK_DELETE, + (xdrproc_t) xdr_blockDelete, (caddr_t) argp, + (xdrproc_t) xdr_blockResponse, (caddr_t) &clnt_res, + TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +} + +blockResponse * +block_exec_1(char **argp, CLIENT *clnt) +{ + 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_blockResponse, (caddr_t) &clnt_res, + TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&clnt_res); +} |