else error = EINVAL;
if (error == ENODEV) error = EINVAL;
remote_pioctl (struct proc *p,	       struct sys_pioctl_args *arg,	       struct ViceIoctl *vice_ioctl,	       struct vnode *vp){    int error;    struct xfs_message_pioctl msg;    struct xfs_message_wakeup_data *msg2;    if (vp != NULL) {	struct xfs_node *xn;	if (vp->v_tag != VT_AFS) {	    XFSDEB(XDEBSYS, ("xfs_syscall: file is not in afs\n"));	    vrele(vp);	    return EINVAL;	}	xn = VNODE_TO_XNODE(vp);	msg.handle = xn->handle;	vrele(vp);    }    if (vice_ioctl->in_size > 2048) {	printf("xfs_pioctl_call: got a humongous in packet: opcode: %d",	       SCARG(arg, a_opcode));	return EINVAL;    }    if (vice_ioctl->in_size != 0) {	error = copyin(vice_ioctl->in,		       &msg.msg,		       vice_ioctl->in_size);	if (error)	    return error;    }    msg.header.opcode = XFS_MSG_PIOCTL;    msg.opcode = SCARG(arg, a_opcode);    msg.insize = vice_ioctl->in_size;    msg.outsize = vice_ioctl->out_size;#ifdef __osf__    msg.cred.uid = p->p_ruid;    msg.cred.pag = xfs_get_pag(p->p_rcred);#else    msg.cred.uid = p->p_cred->p_ruid;    msg.cred.pag = xfs_get_pag(p->p_ucred);#endif    error = xfs_message_rpc(0, &msg.header, sizeof(msg)); /* XXX */    msg2 = (struct xfs_message_wakeup_data *) &msg;    if (error == 0)	error = msg2->error;    else	error = EINVAL; /* return EINVAL to not confuse applications */    if (error == 0 && msg2->header.opcode == XFS_MSG_WAKEUP_DATA)	error = copyout(msg2->msg, vice_ioctl->out, 			min(msg2->len, vice_ioctl->out_size));    return error;}