summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness/fs_harness_flash_bin.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-29 23:39:12 -0400
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-06-06 23:01:30 -0600
commit8a9fc1704dcf3ec117a3bf37fd70a44a43873659 (patch)
tree8970e5d141e0193c15d1f77aee8c248320350979 /cmd/sbc_harness/fs_harness_flash_bin.c
parent30a60acc14696551ccdb61d4006defcb5eea8cc6 (diff)
lib9p: Use <libmisc/error.h> errnums internally
Diffstat (limited to 'cmd/sbc_harness/fs_harness_flash_bin.c')
-rw-r--r--cmd/sbc_harness/fs_harness_flash_bin.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/sbc_harness/fs_harness_flash_bin.c b/cmd/sbc_harness/fs_harness_flash_bin.c
index 8bd144e..0a7364a 100644
--- a/cmd/sbc_harness/fs_harness_flash_bin.c
+++ b/cmd/sbc_harness/fs_harness_flash_bin.c
@@ -170,13 +170,13 @@ static void flash_file_wstat(struct flash_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");
}
static void flash_file_remove(struct flash_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 flash_file, flash_file);
@@ -230,7 +230,7 @@ static void flash_file_pread(struct flash_file *self, struct lib9p_srv_ctx *ctx,
if (byte_offset > DATA_SIZE) {
lib9p_error(&ctx->basectx,
- LIB9P_ERRNO_L_EINVAL, "offset is past the chip size");
+ E_POSIX_EINVAL, "offset is past the chip size");
return;
}
@@ -276,14 +276,14 @@ static uint32_t flash_file_pwrite(struct flash_file *self, struct lib9p_srv_ctx
if (byte_offset > DATA_HSIZE) {
lib9p_error(&ctx->basectx,
- LIB9P_ERRNO_L_EINVAL, "offset is past half the chip size");
+ E_POSIX_EINVAL, "offset is past half the chip size");
return 0;
}
if (byte_count == 0)
return 0;
if (byte_offset == DATA_HSIZE) {
lib9p_error(&ctx->basectx,
- LIB9P_ERRNO_L_EINVAL, "offset is at half the chip size");
+ E_POSIX_EINVAL, "offset is at half the chip size");
return 0;
}