From ee289c241577a3553bfd73211cd81e137ab4fe40 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 1 May 2021 19:58:58 +0200 Subject: lib9p: remove Srv.srvfd, make postsrv() and threadpostsrv() return the mountable file descriptor, update documentation Now that we have these new functions, we can also make them return an error instead of calling sysfatal() like postmountsrv(). Remove the confusing Srv.srvfd, as it is only temporarily used and return it from postsrv() instead. --- sys/include/9p.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/include/9p.h') diff --git a/sys/include/9p.h b/sys/include/9p.h index 1a51ffeab..bfbe0d7ec 100644 --- a/sys/include/9p.h +++ b/sys/include/9p.h @@ -214,7 +214,6 @@ struct Srv { int infd; int outfd; - int srvfd; char* keyspec; /* below is implementation-specific; don't use */ @@ -243,13 +242,13 @@ void srvforker(void (*)(void*), void*, int); void threadsrvforker(void (*)(void*), void*, int); void srv(Srv*); -void postsrv(Srv*, char*); +int postsrv(Srv*, char*); void postmountsrv(Srv*, char*, char*, int); void postsharesrv(Srv*, char*, char*, char*); void listensrv(Srv*, char*); void threadsrv(Srv*); -void threadpostsrv(Srv*, char*); +int threadpostsrv(Srv*, char*); void threadpostmountsrv(Srv*, char*, char*, int); void threadpostsharesrv(Srv*, char*, char*, char*); void threadlistensrv(Srv *s, char *addr); -- cgit v1.2.3