Module Name: src Committed By: jakllsch Date: Sun Dec 13 23:01:42 UTC 2009
Modified Files: src/sys/arch/i386/stand/pxeboot: dev_net.c main.c pxe.c pxe_netif.h Log Message: 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). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/stand/pxeboot/dev_net.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/stand/pxeboot/main.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/stand/pxeboot/pxe.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/i386/stand/pxeboot/pxe_netif.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/i386/stand/pxeboot/dev_net.c diff -u src/sys/arch/i386/stand/pxeboot/dev_net.c:1.9 src/sys/arch/i386/stand/pxeboot/dev_net.c:1.10 --- src/sys/arch/i386/stand/pxeboot/dev_net.c:1.9 Sat Mar 14 15:36:08 2009 +++ src/sys/arch/i386/stand/pxeboot/dev_net.c Sun Dec 13 23:01:42 2009 @@ -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 @@ 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); Index: src/sys/arch/i386/stand/pxeboot/main.c diff -u src/sys/arch/i386/stand/pxeboot/main.c:1.21 src/sys/arch/i386/stand/pxeboot/main.c:1.22 --- src/sys/arch/i386/stand/pxeboot/main.c:1.21 Mon Sep 14 11:56:27 2009 +++ src/sys/arch/i386/stand/pxeboot/main.c Sun Dec 13 23:01:42 2009 @@ -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 @@ 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"); Index: src/sys/arch/i386/stand/pxeboot/pxe.c diff -u src/sys/arch/i386/stand/pxeboot/pxe.c:1.16 src/sys/arch/i386/stand/pxeboot/pxe.c:1.17 --- src/sys/arch/i386/stand/pxeboot/pxe.c:1.16 Mon Oct 26 19:16:56 2009 +++ src/sys/arch/i386/stand/pxeboot/pxe.c Sun Dec 13 23:01:42 2009 @@ -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 @@ uc->status); } -void -pxe_netif_shutdown(void) -{ - - pxe_fini(); -} - struct iodesc * socktodesc(int sock) { Index: src/sys/arch/i386/stand/pxeboot/pxe_netif.h diff -u src/sys/arch/i386/stand/pxeboot/pxe_netif.h:1.1 src/sys/arch/i386/stand/pxeboot/pxe_netif.h:1.2 --- src/sys/arch/i386/stand/pxeboot/pxe_netif.h:1.1 Wed Mar 12 17:33:10 2003 +++ src/sys/arch/i386/stand/pxeboot/pxe_netif.h Sun Dec 13 23:01:42 2009 @@ -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);