summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-05-09 21:13:38 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-05-09 21:13:38 +0000
commitbc5216763885c4da70a356ddda6344967c6cc413 (patch)
tree62804187122d31564db1a1b607c2414e39783e0e /sys
parent18c92b1d9bef14a719db6ab9ee32fd566ee34a04 (diff)
Remove bootsync(), use vfs_shutdown() instead
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amiga/amiga/machdep.c61
1 files changed, 9 insertions, 52 deletions
diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c
index 09ef853e715..4d0c1b3a0f3 100644
--- a/sys/arch/amiga/amiga/machdep.c
+++ b/sys/arch/amiga/amiga/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.10 1996/05/08 01:30:40 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.11 1996/05/09 21:13:37 niklas Exp $ */
/* $NetBSD: machdep.c,v 1.65 1996/05/01 09:56:22 veego Exp $ */
/*
@@ -959,66 +959,23 @@ sys_sigreturn(p, v, retval)
static int waittime = -1;
void
-bootsync(void)
+boot(howto)
+ register int howto;
{
- if (waittime < 0) {
- register struct buf *bp;
- int iter, nbusy;
+ /* take a snap shot before clobbering any registers */
+ if (curproc)
+ savectx(&curproc->p_addr->u_pcb);
+ boothowto = howto;
+ if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
waittime = 0;
- (void) spl0();
- printf("syncing disks... ");
- /*
- * Release vnodes held by texts before sync.
- */
- if (panicstr == 0)
- vnode_pager_umount(NULL);
- sys_sync(&proc0, (void *)NULL, (int *)NULL);
- /*
- * unmount filesystems
- */
- if (panicstr == 0) {
- extern struct proc proc0;
- if (curproc == NULL)
- curproc = &proc0;
-
- vfs_unmountall();
- }
-
- for (iter = 0; iter < 20; iter++) {
- nbusy = 0;
- for (bp = &buf[nbuf]; --bp >= buf; )
- if ((bp->b_flags & (B_BUSY|B_INVAL)) == B_BUSY)
- nbusy++;
- if (nbusy == 0)
- break;
- printf("%d ", nbusy);
- delay(40000 * iter);
- }
- if (nbusy)
- printf("giving up\n");
- else
- printf("done\n");
+ vfs_shutdown();
/*
* If we've been adjusting the clock, the todr
* will be out of synch; adjust it now.
*/
resettodr();
}
-}
-
-
-void
-boot(howto)
- register int howto;
-{
- /* take a snap shot before clobbering any registers */
- if (curproc)
- savectx(&curproc->p_addr->u_pcb);
-
- boothowto = howto;
- if ((howto & RB_NOSYNC) == 0)
- bootsync();
/* Disable interrupts. */
spl7();