diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-06-10 00:47:32 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-06-10 16:47:14 -0600 |
commit | 6eafa9fd3a49289d34007a018b6d1fba8e4b7e24 (patch) | |
tree | 61dddfb0735fe841a0e1c56ea331a360a2d2dad0 /lib9p/tests/test_server/fs_shutdown.c | |
parent | db43b1ae4456367d9909ce3ccc00be7dede651fc (diff) |
libmisc: obj.h: Rework the LO_INTERFACE_* API to expose method funcs
Diffstat (limited to 'lib9p/tests/test_server/fs_shutdown.c')
-rw-r--r-- | lib9p/tests/test_server/fs_shutdown.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib9p/tests/test_server/fs_shutdown.c b/lib9p/tests/test_server/fs_shutdown.c index 079442e..1afbaf3 100644 --- a/lib9p/tests/test_server/fs_shutdown.c +++ b/lib9p/tests/test_server/fs_shutdown.c @@ -8,20 +8,19 @@ #include "fs_shutdown.h" -LO_IMPLEMENTATION_C(lib9p_srv_file, struct shutdown_file, shutdown_file, static); +LO_IMPLEMENTATION_C(lib9p_srv_file, struct shutdown_file, shutdown_file); struct shutdown_fio { struct shutdown_file *parent; }; -LO_IMPLEMENTATION_H(lib9p_srv_fio, struct shutdown_fio, shutdown_fio); -LO_IMPLEMENTATION_C(lib9p_srv_fio, struct shutdown_fio, shutdown_fio, static); +LO_IMPLEMENTATION_STATIC(lib9p_srv_fio, struct shutdown_fio, shutdown_fio); /* srv_file *******************************************************************/ -static void shutdown_file_free(struct shutdown_file *self) { +void shutdown_file_free(struct shutdown_file *self) { assert(self); } -static struct lib9p_qid shutdown_file_qid(struct shutdown_file *self) { +struct lib9p_qid shutdown_file_qid(struct shutdown_file *self) { assert(self); return (struct lib9p_qid){ .type = LIB9P_QT_FILE | LIB9P_QT_APPEND, @@ -30,7 +29,7 @@ static struct lib9p_qid shutdown_file_qid(struct shutdown_file *self) { }; } -static lib9p_srv_stat_or_error shutdown_file_stat(struct shutdown_file *self, struct lib9p_srv_ctx *ctx) { +lib9p_srv_stat_or_error shutdown_file_stat(struct shutdown_file *self, struct lib9p_srv_ctx *ctx) { assert(self); assert(ctx); return ERROR_NEW_VAL(lib9p_srv_stat, ((struct lib9p_srv_stat){ @@ -46,20 +45,20 @@ static lib9p_srv_stat_or_error shutdown_file_stat(struct shutdown_file *self, st .extension = lib9p_str(NULL), })); } -static error shutdown_file_wstat(struct shutdown_file *self, struct lib9p_srv_ctx *ctx, struct lib9p_srv_stat) { +error shutdown_file_wstat(struct shutdown_file *self, struct lib9p_srv_ctx *ctx, struct lib9p_srv_stat) { assert(self); assert(ctx); return error_new(E_POSIX_EROFS, "cannot wstat API file"); } -static error shutdown_file_remove(struct shutdown_file *self, struct lib9p_srv_ctx *ctx) { +error shutdown_file_remove(struct shutdown_file *self, struct lib9p_srv_ctx *ctx) { assert(self); assert(ctx); return error_new(E_POSIX_EROFS, "cannot remove API file"); } -LIB9P_SRV_NOTDIR(struct shutdown_file, shutdown_file); +LIB9P_SRV_NOTDIR(, struct shutdown_file, shutdown_file); -static lib9p_srv_fio_or_error shutdown_file_fopen(struct shutdown_file *self, struct lib9p_srv_ctx *ctx, bool, bool, bool) { +lib9p_srv_fio_or_error shutdown_file_fopen(struct shutdown_file *self, struct lib9p_srv_ctx *ctx, bool, bool, bool) { assert(self); assert(ctx); @@ -76,7 +75,7 @@ static void shutdown_fio_iofree(struct shutdown_fio *self) { free(self); } -static struct lib9p_qid shutdown_fio_qid(struct shutdown_fio *self) { +static struct lib9p_qid shutdown_fio_ioqid(struct shutdown_fio *self) { assert(self); return shutdown_file_qid(self->parent); } |