Mercurial > nomad > old-fuse
changeset 130:344304b7fe67
client: provide a stub RPC handler for LOOKUP
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 | 226dba00c5d1 |
children | fa2ca8654581 |
files | src/client/CMakeLists.txt src/client/cmd_dir.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:05 2015 -0400 +++ b/src/client/CMakeLists.txt Sun Oct 18 09:43:05 2015 -0400 @@ -25,6 +25,7 @@ cmds.c # assorted RPC handlers + cmd_dir.c cmd_login.c cmd_nop.c cmd_obj.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/client/cmd_dir.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_lookup(union cmd *cmd) +{ + return ENOTSUP; +}
--- a/src/client/cmds.c Sun Oct 18 09:43:05 2015 -0400 +++ b/src/client/cmds.c Sun Oct 18 09:43:05 2015 -0400 @@ -60,6 +60,7 @@ bool_t (*res)(XDR *, void *); } cmdtbl[] = { CMD_ARG_RET(NRPC_LOGIN, login, cmd_login), + CMD_ARG_RET(NRPC_LOOKUP, lookup, cmd_lookup), CMD (NRPC_NOP, nop, cmd_nop), CMD_ARG_RET(NRPC_STAT, stat, cmd_stat), };
--- a/src/client/cmds.h Sun Oct 18 09:43:05 2015 -0400 +++ b/src/client/cmds.h Sun Oct 18 09:43:05 2015 -0400 @@ -32,6 +32,12 @@ struct rpc_login_res res; } login; + /* lookup */ + struct { + struct rpc_lookup_req req; + struct rpc_lookup_res res; + } lookup; + /* nop - no req & no res */ /* stat */ @@ -45,6 +51,7 @@ /* RPC handlers */ extern int cmd_login(union cmd *cmd); +extern int cmd_lookup(union cmd *cmd); extern int cmd_nop(union cmd *cmd); extern int cmd_stat(union cmd *cmd);