summaryrefslogtreecommitdiff
path: root/lib9p/srv.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/srv.c')
-rw-r--r--lib9p/srv.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib9p/srv.c b/lib9p/srv.c
index 83a6555..43676a8 100644
--- a/lib9p/srv.c
+++ b/lib9p/srv.c
@@ -28,10 +28,10 @@
#define FIDFLAG_OPEN (FIDFLAG_OPEN_R|FIDFLAG_OPEN_W)
struct _srv_fidinfo {
- struct lib9p_srv_file *file;
- uint8_t flags;
- size_t dir_idx;
- uint32_t dir_off;
+ implements_lib9p_srv_file *file;
+ uint8_t flags;
+ size_t dir_idx;
+ uint32_t dir_off;
};
#define NAME fidmap
@@ -65,7 +65,7 @@ struct _srv_conn {
struct _srv_sess {
/* immutable */
- struct _srv_conn *parent_conn;
+ struct _srv_conn *parent_conn;
enum lib9p_version version;
uint32_t max_msg_size;
uint32_t rerror_overhead;
@@ -407,7 +407,7 @@ static inline bool util_check_perm(struct lib9p_srv_ctx *ctx, struct lib9p_stat
return mode & action;
}
-static inline bool util_release(struct lib9p_srv_ctx *ctx, struct lib9p_srv_file *file) {
+static inline bool util_release(struct lib9p_srv_ctx *ctx, implements_lib9p_srv_file *file) {
assert(file);
file->_refcount--;
if (file->_refcount == 0) {
@@ -564,7 +564,7 @@ static void handle_Tattach(struct _lib9p_srv_req *ctx,
return;
}
- struct lib9p_srv_file *rootdir = srv->rootdir(&ctx->ctx, req->aname.utf8);
+ implements_lib9p_srv_file *rootdir = srv->rootdir(&ctx->ctx, req->aname.utf8);
assert((rootdir == NULL) == lib9p_ctx_has_error(&ctx->ctx.basectx));
if (lib9p_ctx_has_error(&ctx->ctx.basectx))
return;
@@ -623,7 +623,7 @@ static void handle_Twalk(struct _lib9p_srv_req *ctx,
return;
}
- struct lib9p_srv_file *dir = fidinfo->file;
+ implements_lib9p_srv_file *dir = fidinfo->file;
if (req->newfid != req->fid) {
dir = VCALL(dir, clone, &ctx->ctx);
assert((dir == NULL) == lib9p_ctx_has_error(&ctx->ctx.basectx));
@@ -635,7 +635,7 @@ static void handle_Twalk(struct _lib9p_srv_req *ctx,
resp->wqid = (struct lib9p_qid *)(&resp[1]);
for (resp->nwqid = 0; resp->nwqid < req->nwname; resp->nwqid++) {
- struct lib9p_srv_file *member;
+ implements_lib9p_srv_file *member;
if (strcmp(req->wname[resp->nwqid].utf8, "..") == 0) {
member = dir->_parent_dir;
} else {
@@ -727,7 +727,7 @@ static void handle_Topen(struct _lib9p_srv_req *ctx,
/* Variables. */
lib9p_o_t reqmode = req->mode;
uint8_t fidflags = fidinfo->flags;
- struct lib9p_srv_file *file = fidinfo->file;
+ implements_lib9p_srv_file *file = fidinfo->file;
/* Check permissions. */
if (reqmode & LIB9P_O_RCLOSE) {
@@ -811,7 +811,7 @@ static void handle_Tread(struct _lib9p_srv_req *ctx,
}
/* Variables. */
- struct lib9p_srv_file *file = fidinfo->file;
+ implements_lib9p_srv_file *file = fidinfo->file;
resp->data.dat = (char *)(&resp[1]);
/* Do it. */
@@ -864,7 +864,7 @@ static void handle_Twrite(struct _lib9p_srv_req *ctx,
}
/* Variables. */
- struct lib9p_srv_file *file = fidinfo->file;
+ implements_lib9p_srv_file *file = fidinfo->file;
/* Do it. */
resp->count = VCALL(file, pwrite, &ctx->ctx, req->data.dat, req->data.len, req->offset);