diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-02-03 15:05:43 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-02-03 21:05:29 -0700 |
commit | 19ca216509a67451f43301b313c76a2fdf11814b (patch) | |
tree | ca95cc64f7f60d9530c1871fa0c9d174d2267693 /lib9p/srv.c | |
parent | c00502686d65001154728d338d41caba41bd1ff7 (diff) |
lib9p: idl: Inline the `d` and `d_signed` structs
Diffstat (limited to 'lib9p/srv.c')
-rw-r--r-- | lib9p/srv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib9p/srv.c b/lib9p/srv.c index 465e0bf..7e6402e 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -818,7 +818,7 @@ static void handle_Tread(struct _lib9p_srv_req *ctx, /* Variables. */ implements_lib9p_srv_file *file = fidinfo->file; - resp->data.dat = (char *)(&resp[1]); + resp->data = (char *)(&resp[1]); /* Do it. */ if (fidinfo->flags & FIDFLAG_ISDIR) { @@ -835,20 +835,20 @@ static void handle_Tread(struct _lib9p_srv_req *ctx, return; } /* Do it. */ - size_t num = VCALL(file, dread, &ctx->ctx, (uint8_t *)resp->data.dat, req->count, idx); + size_t num = VCALL(file, dread, &ctx->ctx, (uint8_t *)resp->data, req->count, idx); /* Translate object-count back to byte-count. */ uint32_t len = 0; for (size_t i = 0; i < num; i++) { uint32_t i_len; - lib9p_stat_validate(&ctx->ctx.basectx, req->count, &((uint8_t *)resp->data.dat)[len], &i_len, NULL); + lib9p_stat_validate(&ctx->ctx.basectx, req->count, &((uint8_t *)resp->data)[len], &i_len, NULL); len += i_len; } - resp->data.len = len; + resp->count = len; /* Remember. */ fidinfo->dir_idx = idx+num; fidinfo->dir_off = req->offset + len; } else - resp->data.len = VCALL(file, pread, &ctx->ctx, resp->data.dat, req->count, req->offset); + resp->count = VCALL(file, pread, &ctx->ctx, resp->data, req->count, req->offset); } static void handle_Twrite(struct _lib9p_srv_req *ctx, @@ -873,7 +873,7 @@ static void handle_Twrite(struct _lib9p_srv_req *ctx, implements_lib9p_srv_file *file = fidinfo->file; /* Do it. */ - resp->count = VCALL(file, pwrite, &ctx->ctx, req->data.dat, req->data.len, req->offset); + resp->count = VCALL(file, pwrite, &ctx->ctx, req->data, req->count, req->offset); } static void handle_Tclunk(struct _lib9p_srv_req *ctx, |