diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-05-09 21:13:38 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-05-09 21:13:38 +0000 |
commit | bc5216763885c4da70a356ddda6344967c6cc413 (patch) | |
tree | 62804187122d31564db1a1b607c2414e39783e0e /sys/arch | |
parent | 18c92b1d9bef14a719db6ab9ee32fd566ee34a04 (diff) |
Remove bootsync(), use vfs_shutdown() instead
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amiga/amiga/machdep.c | 61 |
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(); |