diff options
author | julian <julian@FreeBSD.org> | 1996-08-19 20:07:07 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1996-08-19 20:07:07 +0000 |
commit | 65b6e7181bc8bde1918c94186c38543764663453 (patch) | |
tree | d4294827ff886d20438cfade654560e1d181c7e2 /sys/dev/vn | |
parent | c663bae3b71b62dea313426b5c2729c15e305f38 (diff) | |
download | FreeBSD-src-65b6e7181bc8bde1918c94186c38543764663453.zip FreeBSD-src-65b6e7181bc8bde1918c94186c38543764663453.tar.gz |
Collect all the functioons concerned with rebooting into one place
also add the at_shutdown callout list, and change the one user of
the present (broken) method (the vn driver) to use the new scheme.
Diffstat (limited to 'sys/dev/vn')
-rw-r--r-- | sys/dev/vn/vn.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c index 652918e..ba0d56b 100644 --- a/sys/dev/vn/vn.c +++ b/sys/dev/vn/vn.c @@ -38,7 +38,7 @@ * from: Utah Hdr: vn.c 1.13 94/04/02 * * from: @(#)vn.c 8.6 (Berkeley) 4/1/94 - * $Id: vn.c,v 1.36 1996/03/28 15:25:43 bde Exp $ + * $Id: vn.c,v 1.37 1996/07/23 21:51:26 phk Exp $ */ /* @@ -149,7 +149,7 @@ static u_long vn_options; static void vniodone (struct buf *bp); static int vnsetcred (struct vn_softc *vn, struct ucred *cred); -static void vnshutdown (void); +static void vnshutdown (int ,void *); static void vnclear (struct vn_softc *vn); static int @@ -563,7 +563,7 @@ vnsetcred(struct vn_softc *vn, struct ucred *cred) } void -vnshutdown() +vnshutdown(int howto, void *ignored) { int i; @@ -572,8 +572,6 @@ vnshutdown() vnclear(vn_softc[i]); } -TEXT_SET(cleanup_set, vnshutdown); - void vnclear(struct vn_softc *vn) { @@ -624,6 +622,9 @@ vn_drvinit(void *unused) if( ! vn_devsw_installed ) { bdevsw_add_generic(BDEV_MAJOR,CDEV_MAJOR, &vn_bdevsw); vn_devsw_installed = 1; + if(at_shutdown(&vnshutdown,NULL) { + printf("vn: could not install shutdown hook\n"); + } #ifdef DEVFS for (unit = 0; unit < NVN; unit++) { vn = vn_softc[unit]; |