summaryrefslogtreecommitdiff
path: root/cmd/srv9p/main.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-07 18:04:03 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-07 18:04:03 -0600
commit9c7f19c46d8fb58b6bcfe0d1d026c05657ffba96 (patch)
tree70c52d35473757bc2c72ecc5295ff90c9c05067d /cmd/srv9p/main.c
parent62e8081e0ac4a4c170bc536303f7a9bd3e91fd7b (diff)
wip
Diffstat (limited to 'cmd/srv9p/main.c')
-rw-r--r--cmd/srv9p/main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/cmd/srv9p/main.c b/cmd/srv9p/main.c
index 6ed4b79..236bf60 100644
--- a/cmd/srv9p/main.c
+++ b/cmd/srv9p/main.c
@@ -19,7 +19,9 @@
#define UNUSED(name) /* name __attribute__((unused)) */
-static struct static_dir_data root = {
+static struct static_dir root = {
+ .header = { .vtable = &static_dir_vtable },
+
.u_name = "root", .u_num = 0, /* owner user */
.g_name = "root", .g_num = 0, /* owner group */
.m_name = "root", .m_num = 0, /* last-modified-by user */
@@ -35,11 +37,8 @@ static struct static_dir_data root = {
},
};
-struct lib9p_srv_file fs_root(struct lib9p_srv_ctx *UNUSED(ctx), char *UNUSED(treename)) {
- return (struct lib9p_srv_file){
- .vtable = static_dir_vtable,
- .impldata = &root,
- };
+struct lib9p_srv_file *fs_root(struct lib9p_srv_ctx *UNUSED(ctx), char *UNUSED(treename)) {
+ return &root.header;
}
int main() {