From: mickey Date: Wed, 17 Apr 1996 05:09:13 +0000 (+0000) Subject: Removed vax ifdefed function from kern_subr.c (from NetBSD). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f657594cc26df9d9ba94aa1b70c4599e849a2ef2;p=openbsd Removed vax ifdefed function from kern_subr.c (from NetBSD). Do sync in the order of umount (vfs_syscals.c), as it was pointed by someone in NetBSD's lists. --- diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index 149c58e15e5..e0ae4093157 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -139,49 +139,6 @@ again: 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. */ diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 72370525422..617919acce6 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,3 +1,4 @@ +/* $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 $ */ /* @@ -429,12 +430,12 @@ sys_sync(p, v, retval) 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. @@ -450,7 +451,7 @@ sys_sync(p, v, retval) * 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); } }