Blob


1 #include <u.h>
2 #include <libc.h>
3 #include <fcall.h>
4 #include <thread.h>
5 #include <9p.h>
7 static void
8 launchsrv(void *v)
9 {
10 srv(v);
11 }
13 void
14 threadpostmountsrv(Srv *s, char *name, char *mtpt, int flag)
15 {
16 int fd[2];
18 if(mtpt)
19 sysfatal("mount not supported");
21 if(!s->nopipe){
22 if(pipe(fd) < 0)
23 sysfatal("pipe: %r");
24 s->infd = s->outfd = fd[1];
25 s->srvfd = fd[0];
26 }
27 if(name && post9pservice(s->srvfd, name) < 0)
28 sysfatal("post9pservice %s: %r", name);
29 proccreate(launchsrv, s, 32*1024);
30 }