diff options
Diffstat (limited to 'cmd/sbc_harness/fs_harness_flash_bin.c')
-rw-r--r-- | cmd/sbc_harness/fs_harness_flash_bin.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cmd/sbc_harness/fs_harness_flash_bin.c b/cmd/sbc_harness/fs_harness_flash_bin.c index bdb8da4..bc3d061 100644 --- a/cmd/sbc_harness/fs_harness_flash_bin.c +++ b/cmd/sbc_harness/fs_harness_flash_bin.c @@ -4,6 +4,8 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +#include <string.h> + #include <hardware/flash.h> #include <hardware/watchdog.h> @@ -173,13 +175,13 @@ static void flash_file_wstat(struct flash_file *self, struct lib9p_srv_ctx *ctx, assert(self); assert(ctx); - lib9p_error(&ctx->basectx, LINUX_EROFS, "read-only part of filesystem"); + lib9p_error(&ctx->basectx, LIB9P_ERRNO_L_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, LINUX_EROFS, "read-only part of filesystem"); + lib9p_error(&ctx->basectx, LIB9P_ERRNO_L_EROFS, "read-only part of filesystem"); } LIB9P_SRV_NOTDIR(struct flash_file, flash_file); @@ -233,7 +235,7 @@ static void flash_file_pread(struct flash_file *self, struct lib9p_srv_ctx *ctx, if (byte_offset > DATA_SIZE) { lib9p_error(&ctx->basectx, - LINUX_EINVAL, "offset is past the chip size"); + LIB9P_ERRNO_L_EINVAL, "offset is past the chip size"); return; } @@ -279,14 +281,14 @@ static uint32_t flash_file_pwrite(struct flash_file *self, struct lib9p_srv_ctx if (byte_offset > DATA_HSIZE) { lib9p_error(&ctx->basectx, - LINUX_EINVAL, "offset is past half the chip size"); + LIB9P_ERRNO_L_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, - LINUX_EINVAL, "offset is at half the chip size"); + LIB9P_ERRNO_L_EINVAL, "offset is at half the chip size"); return 0; } |