diff options
author | bde <bde@FreeBSD.org> | 1996-08-28 17:45:08 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-08-28 17:45:08 +0000 |
commit | 6a84c3f5ef8b191a60eb7409c14a1380f90a4649 (patch) | |
tree | c8e4140ee37109c58d9d992a86a8bcac57dae72a | |
parent | 66d78e8ad534be0a565753d825233f69b69968b2 (diff) | |
download | FreeBSD-src-6a84c3f5ef8b191a60eb7409c14a1380f90a4649.zip FreeBSD-src-6a84c3f5ef8b191a60eb7409c14a1380f90a4649.tar.gz |
Call bdevsw_add_generic() later so that there is no chance of returning
with an inconsistent state. I think the return actually "can't happen".
Cleaned up style of recent changes.
I only fiddled with this because of bugs in recent changes.
-rw-r--r-- | sys/dev/vn/vn.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c index 70a31ef..fc6322b 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.39 1996/08/19 21:06:39 julian Exp $ + * $Id: vn.c,v 1.40 1996/08/22 03:50:00 julian 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 (int ,void *); +static void vnshutdown (int, void *); static void vnclear (struct vn_softc *vn); static int @@ -620,11 +620,11 @@ vn_drvinit(void *unused) #endif if( ! vn_devsw_installed ) { - bdevsw_add_generic(BDEV_MAJOR,CDEV_MAJOR, &vn_bdevsw); - if(at_shutdown(&vnshutdown, NULL, SHUTDOWN_POST_SYNC)) { + if (at_shutdown(&vnshutdown, NULL, SHUTDOWN_POST_SYNC)) { printf("vn: could not install shutdown hook\n"); return; } + bdevsw_add_generic(BDEV_MAJOR, CDEV_MAJOR, &vn_bdevsw); #ifdef DEVFS for (unit = 0; unit < NVN; unit++) { vn = vn_softc[unit]; |