Mercurial > nomad
changeset 810:fb7d3a533c5a
fs: pass dev_t info to create helper
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sun, 05 Apr 2020 16:09:33 -0400 |
parents | b6b70a504329 |
children | 13df67029f94 |
files | src/fs/nomadfs.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fs/nomadfs.c Sun Apr 05 16:09:11 2020 -0400 +++ b/src/fs/nomadfs.c Sun Apr 05 16:09:33 2020 -0400 @@ -94,7 +94,7 @@ } static int __create(fuse_req_t req, fuse_ino_t parent, const char *name, - uint16_t mode, struct noid *child_oid) + uint16_t mode, dev_t dev, struct noid *child_oid) { const struct fuse_ctx *fuse_ctx; uint32_t dir_ohandle; @@ -108,8 +108,10 @@ if (ret) return ret; + STATIC_ASSERT(sizeof(dev_t) <= sizeof(uint64_t)); + ret = fscall_create(&state, dir_ohandle, name, fuse_ctx->uid, - fuse_ctx->gid, mode, 0, child_oid); + fuse_ctx->gid, mode, dev, child_oid); if (ret) goto err; @@ -264,7 +266,7 @@ struct nattr nattr; int ret; - ret = __create(req, parent, name, mode_to_nmode(mode), &child_oid); + ret = __create(req, parent, name, mode_to_nmode(mode), 0, &child_oid); if (ret) goto err; @@ -405,7 +407,7 @@ uint32_t ohandle; int ret; - ret = __create(req, parent, name, mode_to_nmode(mode), &child_oid); + ret = __create(req, parent, name, mode_to_nmode(mode), 0, &child_oid); if (ret) goto err;