summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/sbc_harness/config/config.h3
-rw-r--r--cmd/sbc_harness/fs_harness_flash_bin.c13
-rw-r--r--cmd/sbc_harness/fs_harness_uptime_txt.c9
3 files changed, 10 insertions, 15 deletions
diff --git a/cmd/sbc_harness/config/config.h b/cmd/sbc_harness/config/config.h
index 7a91001..61745e5 100644
--- a/cmd/sbc_harness/config/config.h
+++ b/cmd/sbc_harness/config/config.h
@@ -37,8 +37,6 @@
/* 9P *************************************************************************/
-#define CONFIG_9P_MAX_ERR_SIZE 128 /* 128 is what Plan 9 4e uses */
-
#define CONFIG_9P_ENABLE_9P2000 1 /* bool */
#define CONFIG_9P_ENABLE_9P2000_u 1 /* bool */
#define CONFIG_9P_ENABLE_9P2000_e 0 /* bool */
@@ -67,6 +65,7 @@
* (8*1024)+160 in 2e and 3e.
*/
#define CONFIG_9P_SRV_MAX_MSG_SIZE ((4*1024)+24)
+#define CONFIG_9P_SRV_MAX_ERR_SIZE 128 /* 128 is what Plan 9 4e uses */
/**
* Maximum host-data-structure size. A message may be larger in
* unmarshaled-host-structures than marshaled-net-bytes due to (1)
diff --git a/cmd/sbc_harness/fs_harness_flash_bin.c b/cmd/sbc_harness/fs_harness_flash_bin.c
index 0a7364a..d3f90b9 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, E_POSIX_EROFS, "read-only part of filesystem");
+ lib9p_error(ctx, 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, E_POSIX_EROFS, "read-only part of filesystem");
+ lib9p_error(ctx, E_POSIX_EROFS, "read-only part of filesystem");
}
LIB9P_SRV_NOTDIR(struct flash_file, flash_file);
@@ -229,8 +229,7 @@ static void flash_file_pread(struct flash_file *self, struct lib9p_srv_ctx *ctx,
assert(ret);
if (byte_offset > DATA_SIZE) {
- lib9p_error(&ctx->basectx,
- E_POSIX_EINVAL, "offset is past the chip size");
+ lib9p_error(ctx, E_POSIX_EINVAL, "offset is past the chip size");
return;
}
@@ -275,15 +274,13 @@ static uint32_t flash_file_pwrite(struct flash_file *self, struct lib9p_srv_ctx
assert(ctx);
if (byte_offset > DATA_HSIZE) {
- lib9p_error(&ctx->basectx,
- E_POSIX_EINVAL, "offset is past half the chip size");
+ lib9p_error(ctx, 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,
- E_POSIX_EINVAL, "offset is at half the chip size");
+ lib9p_error(ctx, E_POSIX_EINVAL, "offset is at half the chip size");
return 0;
}
diff --git a/cmd/sbc_harness/fs_harness_uptime_txt.c b/cmd/sbc_harness/fs_harness_uptime_txt.c
index 848c34f..2533558 100644
--- a/cmd/sbc_harness/fs_harness_uptime_txt.c
+++ b/cmd/sbc_harness/fs_harness_uptime_txt.c
@@ -69,13 +69,13 @@ static void uptime_file_wstat(struct uptime_file *self, struct lib9p_srv_ctx *ct
assert(self);
assert(ctx);
- lib9p_error(&ctx->basectx, E_POSIX_EROFS, "read-only part of filesystem");
+ lib9p_error(ctx, E_POSIX_EROFS, "read-only part of filesystem");
}
static void uptime_file_remove(struct uptime_file *self, struct lib9p_srv_ctx *ctx) {
assert(self);
assert(ctx);
- lib9p_error(&ctx->basectx, E_POSIX_EROFS, "read-only part of filesystem");
+ lib9p_error(ctx, E_POSIX_EROFS, "read-only part of filesystem");
}
LIB9P_SRV_NOTDIR(struct uptime_file, uptime_file);
@@ -123,8 +123,7 @@ static void uptime_fio_pread(struct uptime_fio *self, struct lib9p_srv_ctx *ctx,
}
if (byte_offset > (uint64_t)self->buf_len) {
- lib9p_error(&ctx->basectx,
- E_POSIX_EINVAL, "offset is past end-of-file length");
+ lib9p_error(ctx, E_POSIX_EINVAL, "offset is past end-of-file length");
return;
}
@@ -145,6 +144,6 @@ static uint32_t uptime_fio_pwrite(struct uptime_fio *self, struct lib9p_srv_ctx
assert(self);
assert(ctx);
- lib9p_error(&ctx->basectx, E_POSIX_EROFS, "read-only part of filesystem");
+ lib9p_error(ctx, E_POSIX_EROFS, "read-only part of filesystem");
return 0;
}