diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-02-05 21:28:07 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-02-05 21:28:07 +0000 |
commit | ba6072d6a477a84ad71cd0652b1b67d9fc177c26 (patch) | |
tree | c9f747cfebb21e8db2fa9b5039949f7c272cf82f | |
parent | 7b40f56c5255394518c4b464a4e77507ee32557c (diff) |
only attach pseudo-device if it's counter is above zero; deraadt@, maja@ ok
-rw-r--r-- | sys/kern/init_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 0b6768cf089..919bcf2be12 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.57 2001/01/01 16:06:12 aaron Exp $ */ +/* $OpenBSD: init_main.c,v 1.58 2001/02/05 21:28:06 mickey Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -357,7 +357,8 @@ main(framep) /* Attach pseudo-devices. */ randomattach(); for (pdev = pdevinit; pdev->pdev_attach != NULL; pdev++) - (*pdev->pdev_attach)(pdev->pdev_count); + if (pdev->pdev_count > 0) + (*pdev->pdev_attach)(pdev->pdev_count); #ifdef CRYPTO swcr_init(); |