summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-04-17 05:09:15 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-04-17 05:09:15 +0000
commitbdac2fcb774bc4a57e1815b2a5e730810b3f0c5f (patch)
treec5706f8e31cf46084fa10e352acd53a8e72360f8 /sys/kern
parent43f5c24b6249bd27f230713486458e47512daa8a (diff)
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.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_subr.c43
-rw-r--r--sys/kern/vfs_syscalls.c7
2 files changed, 4 insertions, 46 deletions
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);
}
}