Shut down the PXE network stack when we are done with it.
This fixes an issue where a CK804 nfe(4) would have a byte-reversed MAC address after pxeboot(8).
This commit is contained in:
parent
0446aae700
commit
8cdfba11fe
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dev_net.c,v 1.9 2009/03/14 15:36:08 dsl Exp $ */
|
||||
/* $NetBSD: dev_net.c,v 1.10 2009/12/13 23:01:42 jakllsch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -127,7 +127,6 @@ net_close(struct open_file *f)
|
|||
if (debug)
|
||||
printf("net_close: calling netif_close()\n");
|
||||
pxe_netif_close(netdev_sock);
|
||||
//pxe_netif_shutdown(); /* XXX shouldn't be done here */
|
||||
netdev_sock = -1;
|
||||
}
|
||||
return (0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.21 2009/09/14 11:56:27 jmcneill Exp $ */
|
||||
/* $NetBSD: main.c,v 1.22 2009/12/13 23:01:42 jakllsch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
|
@ -85,10 +85,17 @@ clearit(void)
|
|||
clear_pc_screen();
|
||||
}
|
||||
|
||||
static void
|
||||
alldone(void)
|
||||
{
|
||||
pxe_fini();
|
||||
clearit();
|
||||
}
|
||||
|
||||
static int
|
||||
bootit(const char *filename, int howto)
|
||||
{
|
||||
if (exec_netbsd(filename, 0, howto, 0, clearit) < 0)
|
||||
if (exec_netbsd(filename, 0, howto, 0, alldone) < 0)
|
||||
printf("boot: %s\n", strerror(errno));
|
||||
else
|
||||
printf("boot returned\n");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pxe.c,v 1.16 2009/10/26 19:16:56 cegger Exp $ */
|
||||
/* $NetBSD: pxe.c,v 1.17 2009/12/13 23:01:42 jakllsch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2001 Wasabi Systems, Inc.
|
||||
|
@ -252,13 +252,6 @@ pxe_netif_close(int sock)
|
|||
uc->status);
|
||||
}
|
||||
|
||||
void
|
||||
pxe_netif_shutdown(void)
|
||||
{
|
||||
|
||||
pxe_fini();
|
||||
}
|
||||
|
||||
struct iodesc *
|
||||
socktodesc(int sock)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* $NetBSD: pxe_netif.h,v 1.1 2003/03/12 17:33:10 drochner Exp $ */
|
||||
/* $NetBSD: pxe_netif.h,v 1.2 2009/12/13 23:01:42 jakllsch Exp $ */
|
||||
|
||||
int pxe_netif_open(void);
|
||||
void pxe_netif_close(int);
|
||||
void pxe_netif_shutdown(void);
|
||||
|
|
Loading…
Reference in New Issue