summaryrefslogtreecommitdiff
path: root/lib9p/tests/test_server/fs_whoami.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/tests/test_server/fs_whoami.c')
-rw-r--r--lib9p/tests/test_server/fs_whoami.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/lib9p/tests/test_server/fs_whoami.c b/lib9p/tests/test_server/fs_whoami.c
index 3cc0683..a282cae 100644
--- a/lib9p/tests/test_server/fs_whoami.c
+++ b/lib9p/tests/test_server/fs_whoami.c
@@ -12,15 +12,14 @@
#include "fs_whoami.h"
-LO_IMPLEMENTATION_C(lib9p_srv_file, struct whoami_file, whoami_file, static);
+LO_IMPLEMENTATION_C(lib9p_srv_file, struct whoami_file, whoami_file);
struct whoami_fio {
struct whoami_file *parent;
size_t buf_len;
char *buf;
};
-LO_IMPLEMENTATION_H(lib9p_srv_fio, struct whoami_fio, whoami_fio);
-LO_IMPLEMENTATION_C(lib9p_srv_fio, struct whoami_fio, whoami_fio, static);
+LO_IMPLEMENTATION_STATIC(lib9p_srv_fio, struct whoami_fio, whoami_fio);
size_t whoami_len(struct lib9p_srv_ctx *ctx) {
assert(ctx);
@@ -41,10 +40,10 @@ size_t whoami_len(struct lib9p_srv_ctx *ctx) {
/* srv_file *******************************************************************/
-static void whoami_file_free(struct whoami_file *self) {
+void whoami_file_free(struct whoami_file *self) {
assert(self);
}
-static struct lib9p_qid whoami_file_qid(struct whoami_file *self) {
+struct lib9p_qid whoami_file_qid(struct whoami_file *self) {
assert(self);
return (struct lib9p_qid){
.type = LIB9P_QT_FILE,
@@ -53,7 +52,7 @@ static struct lib9p_qid whoami_file_qid(struct whoami_file *self) {
};
}
-static lib9p_srv_stat_or_error whoami_file_stat(struct whoami_file *self, struct lib9p_srv_ctx *ctx) {
+lib9p_srv_stat_or_error whoami_file_stat(struct whoami_file *self, struct lib9p_srv_ctx *ctx) {
assert(self);
assert(ctx);
@@ -70,20 +69,20 @@ static lib9p_srv_stat_or_error whoami_file_stat(struct whoami_file *self, struct
.extension = lib9p_str(NULL),
}));
}
-static error whoami_file_wstat(struct whoami_file *self, struct lib9p_srv_ctx *ctx, struct lib9p_srv_stat) {
+error whoami_file_wstat(struct whoami_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 whoami_file_remove(struct whoami_file *self, struct lib9p_srv_ctx *ctx) {
+error whoami_file_remove(struct whoami_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 whoami_file, whoami_file);
+LIB9P_SRV_NOTDIR(, struct whoami_file, whoami_file);
-static lib9p_srv_fio_or_error whoami_file_fopen(struct whoami_file *self, struct lib9p_srv_ctx *ctx, bool, bool, bool) {
+lib9p_srv_fio_or_error whoami_file_fopen(struct whoami_file *self, struct lib9p_srv_ctx *ctx, bool, bool, bool) {
assert(self);
assert(ctx);
@@ -104,7 +103,7 @@ static void whoami_fio_iofree(struct whoami_fio *self) {
free(self);
}
-static struct lib9p_qid whoami_fio_qid(struct whoami_fio *self) {
+static struct lib9p_qid whoami_fio_ioqid(struct whoami_fio *self) {
assert(self);
assert(self->parent);
return whoami_file_qid(self->parent);