return (0);
}
-#ifdef vax /* unused except by ct.c, other oddities XXX */
-/*
- * Get next character written in by user from uio.
- */
-int
-uwritec(uio)
- struct uio *uio;
-{
- register struct iovec *iov;
- register int c;
-
- if (uio->uio_resid <= 0)
- return (-1);
-again:
- if (uio->uio_iovcnt <= 0)
- panic("ureadc: non-positive iovcnt");
- iov = uio->uio_iov;
- if (iov->iov_len == 0) {
- uio->uio_iov++;
- if (--uio->uio_iovcnt == 0)
- return (-1);
- goto again;
- }
- switch (uio->uio_segflg) {
-
- case UIO_USERSPACE:
- c = fubyte(iov->iov_base);
- break;
-
- case UIO_SYSSPACE:
- c = *(u_char *) iov->iov_base;
- break;
- }
- if (c < 0)
- return (-1);
- iov->iov_base++;
- iov->iov_len--;
- uio->uio_resid--;
- uio->uio_offset++;
- return (c);
-}
-#endif /* vax */
-
/*
* General routine to allocate a hash table.
*/
+/* $OpenBSD: vfs_syscalls.c,v 1.5 1996/04/17 05:09:14 mickey Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.68 1996/02/09 19:01:05 christos Exp $ */
/*
register struct mount *mp, *nmp;
int asyncflag;
- for (mp = mountlist.cqh_first; mp != (void *)&mountlist; mp = nmp) {
+ for (mp = mountlist.cqh_last; mp != (void *)&mountlist; mp = nmp) {
/*
* Get the next pointer in case we hang on vfs_busy
* while we are being unmounted.
*/
- nmp = mp->mnt_list.cqe_next;
+ nmp = mp->mnt_list.cqe_prev;
/*
* The lock check below is to avoid races with mount
* and unmount.
* Get the next pointer again, as the next filesystem
* might have been unmounted while we were sync'ing.
*/
- nmp = mp->mnt_list.cqe_next;
+ nmp = mp->mnt_list.cqe_prev;
vfs_unbusy(mp);
}
}