plan9fox/sys/src/lib9p/threadpostsrv.c
cinap_lenrek ee289c2415 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.
2021-05-01 19:58:58 +02:00

14 lines
210 B
C

#include <u.h>
#include <libc.h>
#include <fcall.h>
#include <thread.h>
#include <9p.h>
int
threadpostsrv(Srv *s, char *name)
{
if(s->forker == nil)
s->forker = threadsrvforker;
return postsrv(s, name);
}