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

int
open(char *file, int mode)
{
	Syscallmem *c;

	c = _getsyscallmem();
	strcpy((char*)(&c[1]), file);
	c->arg[0] = 0;
	c->arg[1] = mode;
	c->nr = Sopen;
	return _dosyscall(c);
}



syntax highlighted by Code2HTML, v. 0.9.1