#include <9pm/windows.h>
#include <9pm/u.h>
#include <9pm/libc.h>
#include "syscall.h"

int
mount(int fd, int afd, char *mtpt, int flag, char *spec)
{
	char *a, *s;
	Syscallmem *c;

	c = _getsyscallmem();
	c->arg[0] = fd;
	c->arg[1] = afd;
	s = (char*)(&c[1]);
	a = s;
	strcpy(a, mtpt);
	c->arg[2] = a - s;
	a += strlen(a)+1;
	c->arg[3] = flag;
	strcpy(a, spec);
	c->arg[4] = a - s;
	c->nr = Smount;
	return _dosyscall(c);
}

