diff options
author | Brandon Creighton <bjc@cvs.openbsd.org> | 2001-04-10 12:27:55 +0000 |
---|---|---|
committer | Brandon Creighton <bjc@cvs.openbsd.org> | 2001-04-10 12:27:55 +0000 |
commit | fc2967ade54fa7e225277efa4fe43dd03dc2e4e8 (patch) | |
tree | 68814caabc3df03535c10d63f04a4a340d7c142c /sys/arch/vax/boot | |
parent | bb3d65f4295868e06378312a940a96df9a56084d (diff) |
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().
Diffstat (limited to 'sys/arch/vax/boot')
-rw-r--r-- | sys/arch/vax/boot/boot/netio.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 |