From fc2967ade54fa7e225277efa4fe43dd03dc2e4e8 Mon Sep 17 00:00:00 2001 From: Brandon Creighton Date: Tue, 10 Apr 2001 12:27:55 +0000 Subject: Decrement open_count in netclose(); this fixes the bug which caused boot to halt on boot attempts after a failed network boot attempt. Also, prototype netmountroot() and return 0 in netclose(). --- sys/arch/vax/boot/boot/netio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sys/arch/vax/boot') diff --git a/sys/arch/vax/boot/boot/netio.c b/sys/arch/vax/boot/boot/netio.c index bbc01d23acc..f458f57d710 100644 --- a/sys/arch/vax/boot/boot/netio.c +++ b/sys/arch/vax/boot/boot/netio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netio.c,v 1.1 2000/04/27 02:26:25 bjc Exp $ */ +/* $OpenBSD: netio.c,v 1.2 2001/04/10 12:27:54 bjc Exp $ */ /* $NetBSD: netio.c,v 1.4 1999/06/30 18:38:03 ragge Exp $ */ /*- @@ -111,6 +111,8 @@ int netio_ask = 0; /* default to bootparam, can override */ static char input_line[100]; +int netmountroot __P((struct open_file *, char *)); + /* * Called by devopen after it sets f->f_dev to our devsw entry. * This opens the low-level device and sets f->f_devdata. @@ -139,8 +141,10 @@ int netclose(f) struct open_file *f; { - netif_close(netdev_sock); + if(--open_count == 0) + netif_close(netdev_sock); f->f_devdata = NULL; + return 0; } int -- cgit v1.2.3