summaryrefslogtreecommitdiff
path: root/cmd/srv9p/main.c
diff options
context:
space:
mode:
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() {