Mercurial > nomad
changeset 820:94274e0d4dbe
common: change CREATE/LOOKUP/UNLINK path component field name
The string identifies a single path component, not a whole path. So, let's
rename the fields to 'name' to not confuse.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Mon, 13 Apr 2020 15:42:18 -0400 |
parents | 054a740303bf |
children | d0c9f6b1d009 |
files | src/client/cmd_dir.c src/common/fscall.c src/common/rpc_fs.x |
diffstat | 3 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/client/cmd_dir.c Mon Apr 06 22:24:18 2020 -0400 +++ b/src/client/cmd_dir.c Mon Apr 13 15:42:18 2020 -0400 @@ -36,7 +36,7 @@ if (!oh) return -EINVAL; - return objstore_create(oh->cookie, req->path, req->owner, req->group, + return objstore_create(oh->cookie, req->name, req->owner, req->group, req->mode, req->dev, &res->oid); } @@ -51,7 +51,7 @@ if (!oh) return -EINVAL; - ret = objstore_lookup_one(oh->cookie, req->path, &req->desired, + ret = objstore_lookup_one(oh->cookie, req->name, &req->desired, &res->child, &res->type); /* @@ -79,7 +79,7 @@ if (!oh) return -EINVAL; - return objstore_unlink(oh->cookie, req->path, &req->desired); + return objstore_unlink(oh->cookie, req->name, &req->desired); } int cmd_getdent(struct fsconn *conn, union cmd *cmd)
--- a/src/common/fscall.c Mon Apr 06 22:24:18 2020 -0400 +++ b/src/common/fscall.c Mon Apr 13 15:42:18 2020 -0400 @@ -249,7 +249,7 @@ lookup_req.parent = parent_handle; memset(&lookup_req.desired, 0, sizeof(struct noid)); - lookup_req.path = (char *) name; + lookup_req.name = (char *) name; ret = __fscall(state->sock, NRPC_LOOKUP, (void *) xdr_rpc_lookup_req, @@ -278,7 +278,7 @@ return -EINVAL; create_req.parent = parent_handle; - create_req.path = (char *) name; + create_req.name = (char *) name; create_req.owner = owner; create_req.group = group; create_req.mode = mode; @@ -306,7 +306,7 @@ int ret; unlink_req.parent = parent_handle; - unlink_req.path = (char *) name; + unlink_req.name = (char *) name; if (desired) unlink_req.desired = *desired;
--- a/src/common/rpc_fs.x Mon Apr 06 22:24:18 2020 -0400 +++ b/src/common/rpc_fs.x Mon Apr 13 15:42:18 2020 -0400 @@ -69,7 +69,7 @@ struct rpc_lookup_req { HANDLE(parent); struct noid desired; - string path<>; + string name<>; }; struct rpc_lookup_res { @@ -80,7 +80,7 @@ %/***** CREATE *****/ struct rpc_create_req { HANDLE(parent); - string path<>; + string name<>; uint32_t owner; uint32_t group; uint16_t mode; /* see NATTR_* in common/include/nomad/atrr.h */ @@ -94,7 +94,7 @@ %/***** UNLINK *****/ struct rpc_unlink_req { HANDLE(parent); - string path<>; + string name<>; struct noid desired; };