Mercurial > nomad > old-fuse
changeset 129:226dba00c5d1
client: provide a stub RPC handler for STAT
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sun, 18 Oct 2015 09:43:05 -0400 |
parents | 3e57d8dd41b5 |
children | 344304b7fe67 |
files | src/client/CMakeLists.txt src/client/cmd_obj.c src/client/cmds.c src/client/cmds.h |
diffstat | 4 files changed, 39 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/client/CMakeLists.txt Sun Oct 18 09:43:04 2015 -0400 +++ b/src/client/CMakeLists.txt Sun Oct 18 09:43:05 2015 -0400 @@ -27,6 +27,7 @@ # assorted RPC handlers cmd_login.c cmd_nop.c + cmd_obj.c ) target_link_libraries(nomad-client
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/client/cmd_obj.c Sun Oct 18 09:43:05 2015 -0400 @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2015 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include <nomad/error.h> + +#include "cmds.h" + +int cmd_stat(union cmd *cmd) +{ + return ENOTSUP; +}
--- a/src/client/cmds.c Sun Oct 18 09:43:04 2015 -0400 +++ b/src/client/cmds.c Sun Oct 18 09:43:05 2015 -0400 @@ -61,6 +61,7 @@ } cmdtbl[] = { CMD_ARG_RET(NRPC_LOGIN, login, cmd_login), CMD (NRPC_NOP, nop, cmd_nop), + CMD_ARG_RET(NRPC_STAT, stat, cmd_stat), }; #define MAP_ERRNO(errno) \
--- a/src/client/cmds.h Sun Oct 18 09:43:04 2015 -0400 +++ b/src/client/cmds.h Sun Oct 18 09:43:05 2015 -0400 @@ -33,6 +33,12 @@ } login; /* nop - no req & no res */ + + /* stat */ + struct { + struct rpc_stat_req req; + struct rpc_stat_res res; + } stat; }; extern bool process_connection(int fd); @@ -40,5 +46,6 @@ /* RPC handlers */ extern int cmd_login(union cmd *cmd); extern int cmd_nop(union cmd *cmd); +extern int cmd_stat(union cmd *cmd); #endif