summaryrefslogtreecommitdiff
path: root/lib9p/srv.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/srv.c')
-rw-r--r--lib9p/srv.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib9p/srv.c b/lib9p/srv.c
index f2d1315..7e6402e 100644
--- a/lib9p/srv.c
+++ b/lib9p/srv.c
@@ -53,13 +53,13 @@ struct _srv_fidinfo {
};
#define NAME fidmap
-#define KEY_T uint32_t
+#define KEY_T lib9p_fid_t
#define VAL_T struct _srv_fidinfo
#define CAP CONFIG_9P_MAX_FIDS
#include "map.h"
#define NAME reqmap
-#define KEY_T uint32_t
+#define KEY_T lib9p_tag_t
#define VAL_T struct _lib9p_srv_req *
#define CAP CONFIG_9P_MAX_REQS
#include "map.h"
@@ -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,