From 8a9fc1704dcf3ec117a3bf37fd70a44a43873659 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Thu, 29 May 2025 23:39:12 -0400 Subject: lib9p: Use errnums internally --- lib9p_util/static.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib9p_util/static.c') diff --git a/lib9p_util/static.c b/lib9p_util/static.c index 40810b5..7196813 100644 --- a/lib9p_util/static.c +++ b/lib9p_util/static.c @@ -55,13 +55,13 @@ static void util9p_static_dir_wstat(struct util9p_static_dir *self, struct lib9p assert(self); assert(ctx); - lib9p_error(&ctx->basectx, LIB9P_ERRNO_L_EROFS, "read-only part of filesystem"); + lib9p_error(&ctx->basectx, E_POSIX_EROFS, "read-only part of filesystem"); } static void util9p_static_dir_remove(struct util9p_static_dir *self, struct lib9p_srv_ctx *ctx) { assert(self); assert(ctx); - lib9p_error(&ctx->basectx, LIB9P_ERRNO_L_EROFS, "read-only part of filesystem"); + lib9p_error(&ctx->basectx, E_POSIX_EROFS, "read-only part of filesystem"); } static lo_interface lib9p_srv_file util9p_static_dir_dwalk(struct util9p_static_dir *self, struct lib9p_srv_ctx *ctx, @@ -79,7 +79,7 @@ static lo_interface lib9p_srv_file util9p_static_dir_dwalk(struct util9p_static_ return file; } lib9p_error(&ctx->basectx, - LIB9P_ERRNO_L_ENOENT, "no such file or directory"); + E_POSIX_ENOENT, "no such file or directory"); return LO_NULL(lib9p_srv_file); } @@ -91,7 +91,7 @@ static lo_interface lib9p_srv_file util9p_static_dir_dcreate(struct util9p_stati assert(self); assert(ctx); - lib9p_error(&ctx->basectx, LIB9P_ERRNO_L_EROFS, "read-only part of filesystem"); + lib9p_error(&ctx->basectx, E_POSIX_EROFS, "read-only part of filesystem"); return LO_NULL(lib9p_srv_file); } @@ -173,13 +173,13 @@ static void util9p_static_file_wstat(struct util9p_static_file *self, struct lib assert(self); assert(ctx); - lib9p_error(&ctx->basectx, LIB9P_ERRNO_L_EROFS, "read-only part of filesystem"); + lib9p_error(&ctx->basectx, E_POSIX_EROFS, "read-only part of filesystem"); } static void util9p_static_file_remove(struct util9p_static_file *self, struct lib9p_srv_ctx *ctx) { assert(self); assert(ctx); - lib9p_error(&ctx->basectx, LIB9P_ERRNO_L_EROFS, "read-only part of filesystem"); + lib9p_error(&ctx->basectx, E_POSIX_EROFS, "read-only part of filesystem"); } LIB9P_SRV_NOTDIR(struct util9p_static_file, util9p_static_file); @@ -211,7 +211,7 @@ static void util9p_static_file_pread(struct util9p_static_file *self, struct lib if (byte_offset > (uint64_t)data_size) { lib9p_error(&ctx->basectx, - LIB9P_ERRNO_L_EINVAL, "offset is past end-of-file length"); + E_POSIX_EINVAL, "offset is past end-of-file length"); return; } @@ -229,6 +229,6 @@ static uint32_t util9p_static_file_pwrite(struct util9p_static_file *self, struc assert(self); assert(ctx); - lib9p_error(&ctx->basectx, LIB9P_ERRNO_L_EROFS, "read-only part of filesystem"); + lib9p_error(&ctx->basectx, E_POSIX_EROFS, "read-only part of filesystem"); return 0; } -- cgit v1.2.3-2-g168b