diff options
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 f98db67..e7fdb03 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -599,7 +599,7 @@ static void handle_Tattach(struct _lib9p_srv_req *ctx, &(struct lib9p_msg_Rclunk){}); return; } - lib9p_assert_stat(stat); + lib9p_stat_assert(stat); assert(stat.file_mode & LIB9P_DM_DIR); @@ -670,7 +670,7 @@ static void handle_Twalk(struct _lib9p_srv_req *ctx, util_release(&ctx->ctx, member); /* presumption of taking ref-A failed */ break; } - lib9p_assert_stat(stat); + lib9p_stat_assert(stat); isdir = stat.file_mode & LIB9P_DM_DIR; if (isdir && !util_check_perm(&ctx->ctx, &stat, 0b001)) { lib9p_error(&ctx->ctx.basectx, @@ -745,7 +745,7 @@ static void handle_Topen(struct _lib9p_srv_req *ctx, struct lib9p_stat parent_stat = VCALL(file->_parent_dir, stat, &ctx->ctx); if (lib9p_ctx_has_error(&ctx->ctx.basectx)) return; - lib9p_assert_stat(parent_stat); + lib9p_stat_assert(parent_stat); if (!util_check_perm(&ctx->ctx, &parent_stat, 0b010)) { lib9p_error(&ctx->ctx.basectx, LINUX_EACCES, "permission denied to remove-on-close"); @@ -756,7 +756,7 @@ static void handle_Topen(struct _lib9p_srv_req *ctx, struct lib9p_stat stat = VCALL(file, stat, &ctx->ctx); if (lib9p_ctx_has_error(&ctx->ctx.basectx)) return; - lib9p_assert_stat(stat); + lib9p_stat_assert(stat); if (stat.file_mode & LIB9P_QT_APPEND) reqmode = reqmode & ~LIB9P_O_TRUNC; uint8_t perm_bits = 0; @@ -845,7 +845,7 @@ static void handle_Tread(struct _lib9p_srv_req *ctx, uint32_t len = 0; for (size_t i = 0; i < num; i++) { uint32_t i_len; - lib9p_validate_stat(&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.dat)[len], &i_len, NULL); len += i_len; } resp->data.len = len; @@ -926,7 +926,7 @@ static void handle_Tstat(struct _lib9p_srv_req *ctx, resp->stat = VCALL(fidinfo->file, stat, &ctx->ctx); if (!lib9p_ctx_has_error(&ctx->ctx.basectx)) - lib9p_assert_stat(resp->stat); + lib9p_stat_assert(resp->stat); } static void handle_Twstat(struct _lib9p_srv_req *ctx, |