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.
This commit is contained in:
cinap_lenrek 2021-05-01 19:58:58 +02:00
parent 57c21ae441
commit ee289c2415
8 changed files with 77 additions and 74 deletions

View file

@ -4,10 +4,10 @@
#include <thread.h>
#include <9p.h>
void
int
threadpostsrv(Srv *s, char *name)
{
if(s->forker == nil)
s->forker = threadsrvforker;
postsrv(s, name);
return postsrv(s, name);
}