Not exactly... I was thinking more in terms of:
asmlinkage int sys_pipe(unsigned long * fildes)
{
int fd[2];
int error;
if (copy_from_user(fildes, fd, 2*sizeof(int)) ||
copy_to_user(fildes, fd, 2*sizeof(int))
)
return -EFAULT;
lock_kernel();
error = do_pipe(fd);
unlock_kernel();
if (!error) {
if (copy_to_user(fildes, fd, 2*sizeof(int)))
error = -EFAULT;
}
return error;
}
David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/