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

int
wstat(char *path, uchar *buf, int nbuf)
{
	Syscallmem *c;

	c = _getsyscallmem();
	memmove(&c[1], buf, nbuf);
	strcpy((char*)&c[1]+nbuf, path);
	c->arg[0] = nbuf;
	c->arg[1] = 0;
	c->arg[2] = nbuf;
	c->nr = Swstat;
	return _dosyscall(c);
}


syntax highlighted by Code2HTML, v. 0.9.1