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_flush.c | |
parent | db43b1ae4456367d9909ce3ccc00be7dede651fc (diff) |
libmisc: obj.h: Rework the LO_INTERFACE_* API to expose method funcs
Diffstat (limited to 'lib9p/tests/test_server/fs_flush.c')
-rw-r--r-- | lib9p/tests/test_server/fs_flush.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib9p/tests/test_server/fs_flush.c b/lib9p/tests/test_server/fs_flush.c index 63a52af..41156ba 100644 --- a/lib9p/tests/test_server/fs_flush.c +++ b/lib9p/tests/test_server/fs_flush.c @@ -9,20 +9,19 @@ #define IMPLEMENTATION_FOR_LIB9P_SRV_H YES /* for ctx->flush_ch */ #include "fs_flush.h" -LO_IMPLEMENTATION_C(lib9p_srv_file, struct flush_file, flush_file, static); +LO_IMPLEMENTATION_C(lib9p_srv_file, struct flush_file, flush_file); struct flush_fio { struct flush_file *parent; }; -LO_IMPLEMENTATION_H(lib9p_srv_fio, struct flush_fio, flush_fio); -LO_IMPLEMENTATION_C(lib9p_srv_fio, struct flush_fio, flush_fio, static); +LO_IMPLEMENTATION_STATIC(lib9p_srv_fio, struct flush_fio, flush_fio); /* srv_file *******************************************************************/ -static void flush_file_free(struct flush_file *self) { +void flush_file_free(struct flush_file *self) { assert(self); } -static struct lib9p_qid flush_file_qid(struct flush_file *self) { +struct lib9p_qid flush_file_qid(struct flush_file *self) { assert(self); return (struct lib9p_qid){ .type = LIB9P_QT_FILE, @@ -31,7 +30,7 @@ static struct lib9p_qid flush_file_qid(struct flush_file *self) { }; } -static lib9p_srv_stat_or_error flush_file_stat(struct flush_file *self, struct lib9p_srv_ctx *ctx) { +lib9p_srv_stat_or_error flush_file_stat(struct flush_file *self, struct lib9p_srv_ctx *ctx) { assert(self); assert(ctx); return ERROR_NEW_VAL(lib9p_srv_stat, ((struct lib9p_srv_stat){ @@ -47,20 +46,20 @@ static lib9p_srv_stat_or_error flush_file_stat(struct flush_file *self, struct l .extension = lib9p_str(NULL), })); } -static error flush_file_wstat(struct flush_file *self, struct lib9p_srv_ctx *ctx, struct lib9p_srv_stat) { +error flush_file_wstat(struct flush_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 flush_file_remove(struct flush_file *self, struct lib9p_srv_ctx *ctx) { +error flush_file_remove(struct flush_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 flush_file, flush_file); +LIB9P_SRV_NOTDIR(, struct flush_file, flush_file); -static lib9p_srv_fio_or_error flush_file_fopen(struct flush_file *self, struct lib9p_srv_ctx *ctx, bool, bool, bool) { +lib9p_srv_fio_or_error flush_file_fopen(struct flush_file *self, struct lib9p_srv_ctx *ctx, bool, bool, bool) { assert(self); assert(ctx); @@ -77,7 +76,7 @@ static void flush_fio_iofree(struct flush_fio *self) { free(self); } -static struct lib9p_qid flush_fio_qid(struct flush_fio *self) { +static struct lib9p_qid flush_fio_ioqid(struct flush_fio *self) { assert(self); return flush_file_qid(self->parent); } |