From 6a84c3f5ef8b191a60eb7409c14a1380f90a4649 Mon Sep 17 00:00:00 2001 From: bde Date: Wed, 28 Aug 1996 17:45:08 +0000 Subject: 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. --- sys/dev/vn/vn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys') 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]; -- cgit v1.1