{
struct file *f;
int fd;
-
+
if(argfd(0, 0, &f) < 0)
return -1;
if((fd=fdalloc(f)) < 0)
{
int fd;
struct file *f;
-
+
if(argfd(0, &fd, &f) < 0)
return -1;
proc->ofile[fd] = 0;
{
struct file *f;
struct stat *st;
-
+
if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
return -1;
return filestat(f, st);
{
struct inode *ip;
char *path;
- int len;
int major, minor;
-
+
begin_op();
- if((len=argstr(0, &path)) < 0 ||
+ if((argstr(0, &path)) < 0 ||
argint(1, &major) < 0 ||
argint(2, &minor) < 0 ||
(ip = create(path, T_DEV, major, minor)) == 0){