diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-29 23:39:12 -0400 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-06-06 23:01:30 -0600 |
commit | 8a9fc1704dcf3ec117a3bf37fd70a44a43873659 (patch) | |
tree | 8970e5d141e0193c15d1f77aee8c248320350979 /lib9p_util/static.c | |
parent | 30a60acc14696551ccdb61d4006defcb5eea8cc6 (diff) |
lib9p: Use <libmisc/error.h> errnums internally
Diffstat (limited to 'lib9p_util/static.c')
-rw-r--r-- | lib9p_util/static.c | 16 |
1 files changed, 8 insertions, 8 deletions
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; } |