#include <9pm/windows.h> #include <9pm/u.h> #include <9pm/libc.h> #include "syscall.h" int fversion(int fd, int bufsize, char *version, int nversion) { Syscallmem *c; c = _getsyscallmem(); strcpy((char*)(&c[1]), version); c->arg[0] = fd; c->arg[1] = bufsize; c->arg[2] = 0; c->arg[3] = nversion; c->nr = Sfversion; if(_dosyscall(c) < 0) return -1; strcpy(version, (char*)(&c[1])); return c->ret; }