summaryrefslogtreecommitdiff
path: root/sys/src/lib9p/mount.c
blob: 1adc90bedbafdc48a1d8528bf989ca14f2deb969 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <u.h>
#include <libc.h>
#include <fcall.h>
#include <thread.h>
#include <9p.h>
#include <auth.h>

void
postmountsrv(Srv *s, char *name, char *mtpt, int flag)
{
	postsrv(s, name);

	if(mtpt != nil){
		if(amount(s->srvfd, mtpt, flag, "") == -1)
			sysfatal("mount %s: %r", mtpt);
		/* mount closed s->srvfd */
	} else
		close(s->srvfd);
}