error = (*fp->f_ops->fo_stat)(fp, &ub, p);
error = (*fp->f_ops->fo_stat)(fp, &sb, p);
netbsd_sys___fstat13(p, v, retval)	struct proc *p;	void *v;	register_t *retval;{	register struct netbsd_sys___fstat13_args /* {		syscallarg(int) fd;		syscallarg(struct netbsd_stat *) ub;	} */ *uap = v;	int fd = SCARG(uap, fd);	register struct filedesc *fdp = p->p_fd;	register struct file *fp;	struct netbsd_stat nsb;	struct stat sb;	int error;	if ((u_int)fd >= fdp->fd_nfiles ||	    (fp = fdp->fd_ofiles[fd]) == NULL)		return (EBADF);	error = (*fp->f_ops->fo_stat)(fp, &ub, p);	if (error)		return (error);	openbsd_to_netbsd_stat(&sb, &nsb);	error = copyout(&nsb, SCARG(uap, ub), sizeof(nsb));	return (error);}