diff options
Diffstat (limited to 'lib9p/tests/test_server')
-rw-r--r-- | lib9p/tests/test_server/config/config.h | 3 | ||||
-rw-r--r-- | lib9p/tests/test_server/fs_flush.c | 6 | ||||
-rw-r--r-- | lib9p/tests/test_server/fs_shutdown.c | 4 | ||||
-rw-r--r-- | lib9p/tests/test_server/fs_whoami.c | 7 |
4 files changed, 9 insertions, 11 deletions
diff --git a/lib9p/tests/test_server/config/config.h b/lib9p/tests/test_server/config/config.h index f49894b..a657f60 100644 --- a/lib9p/tests/test_server/config/config.h +++ b/lib9p/tests/test_server/config/config.h @@ -12,8 +12,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 */ @@ -42,6 +40,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/lib9p/tests/test_server/fs_flush.c b/lib9p/tests/test_server/fs_flush.c index 6b677ea..eef9891 100644 --- a/lib9p/tests/test_server/fs_flush.c +++ b/lib9p/tests/test_server/fs_flush.c @@ -50,12 +50,12 @@ static struct lib9p_srv_stat flush_file_stat(struct flush_file *self, struct lib static void flush_file_wstat(struct flush_file *self, struct lib9p_srv_ctx *ctx, struct lib9p_srv_stat) { assert(self); assert(ctx); - lib9p_error(&ctx->basectx, E_POSIX_EROFS, "cannot wstat API file"); + lib9p_error(ctx, E_POSIX_EROFS, "cannot wstat API file"); } static void flush_file_remove(struct flush_file *self, struct lib9p_srv_ctx *ctx) { assert(self); assert(ctx); - lib9p_error(&ctx->basectx, E_POSIX_EROFS, "cannot remove API file"); + lib9p_error(ctx, E_POSIX_EROFS, "cannot remove API file"); } LIB9P_SRV_NOTDIR(struct flush_file, flush_file) @@ -121,7 +121,7 @@ static void flush_fio_pread(struct flush_fio *self, struct lib9p_srv_ctx *ctx, break; case FLUSH_ERROR: lib9p_srv_acknowledge_flush(ctx); - lib9p_error(&ctx->basectx, E_POSIX_ECANCELED, "request canceled by flush"); + lib9p_error(ctx, E_POSIX_ECANCELED, "request canceled by flush"); break; case FLUSH_SILENT: lib9p_srv_acknowledge_flush(ctx); diff --git a/lib9p/tests/test_server/fs_shutdown.c b/lib9p/tests/test_server/fs_shutdown.c index 11a941f..5b3bc71 100644 --- a/lib9p/tests/test_server/fs_shutdown.c +++ b/lib9p/tests/test_server/fs_shutdown.c @@ -49,12 +49,12 @@ static struct lib9p_srv_stat shutdown_file_stat(struct shutdown_file *self, stru static void shutdown_file_wstat(struct shutdown_file *self, struct lib9p_srv_ctx *ctx, struct lib9p_srv_stat) { assert(self); assert(ctx); - lib9p_error(&ctx->basectx, E_POSIX_EROFS, "cannot wstat API file"); + lib9p_error(ctx, E_POSIX_EROFS, "cannot wstat API file"); } static void shutdown_file_remove(struct shutdown_file *self, struct lib9p_srv_ctx *ctx) { assert(self); assert(ctx); - lib9p_error(&ctx->basectx, E_POSIX_EROFS, "cannot remove API file"); + lib9p_error(ctx, E_POSIX_EROFS, "cannot remove API file"); } LIB9P_SRV_NOTDIR(struct shutdown_file, shutdown_file) diff --git a/lib9p/tests/test_server/fs_whoami.c b/lib9p/tests/test_server/fs_whoami.c index 273d659..14dd0ba 100644 --- a/lib9p/tests/test_server/fs_whoami.c +++ b/lib9p/tests/test_server/fs_whoami.c @@ -73,12 +73,12 @@ static struct lib9p_srv_stat whoami_file_stat(struct whoami_file *self, struct l static void whoami_file_wstat(struct whoami_file *self, struct lib9p_srv_ctx *ctx, struct lib9p_srv_stat) { assert(self); assert(ctx); - lib9p_error(&ctx->basectx, E_POSIX_EROFS, "cannot wstat API file"); + lib9p_error(ctx, E_POSIX_EROFS, "cannot wstat API file"); } static void whoami_file_remove(struct whoami_file *self, struct lib9p_srv_ctx *ctx) { assert(self); assert(ctx); - lib9p_error(&ctx->basectx, E_POSIX_EROFS, "cannot remove API file"); + lib9p_error(ctx, E_POSIX_EROFS, "cannot remove API file"); } LIB9P_SRV_NOTDIR(struct whoami_file, whoami_file) @@ -137,8 +137,7 @@ static void whoami_fio_pread(struct whoami_fio *self, struct lib9p_srv_ctx *ctx, ctx->user->num, ctx->user->name.len, ctx->user->name.utf8); if (byte_offset > (uint64_t)data_size) { - 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; } |