Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand/pxeboot Shut down the PXE network stack ...



details:   https://anonhg.NetBSD.org/src/rev/f0bddb2e5b65
branches:  trunk
changeset: 749968:f0bddb2e5b65
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sun Dec 13 23:01:42 2009 +0000

description:
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).

diffstat:

 sys/arch/i386/stand/pxeboot/dev_net.c   |   3 +--
 sys/arch/i386/stand/pxeboot/main.c      |  11 +++++++++--
 sys/arch/i386/stand/pxeboot/pxe.c       |   9 +--------
 sys/arch/i386/stand/pxeboot/pxe_netif.h |   3 +--
 4 files changed, 12 insertions(+), 14 deletions(-)

diffs (78 lines):

diff -r 4c67254ccf31 -r f0bddb2e5b65 sys/arch/i386/stand/pxeboot/dev_net.c
--- a/sys/arch/i386/stand/pxeboot/dev_net.c     Sun Dec 13 21:16:54 2009 +0000
+++ b/sys/arch/i386/stand/pxeboot/dev_net.c     Sun Dec 13 23:01:42 2009 +0000
@@ -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);
diff -r 4c67254ccf31 -r f0bddb2e5b65 sys/arch/i386/stand/pxeboot/main.c
--- a/sys/arch/i386/stand/pxeboot/main.c        Sun Dec 13 21:16:54 2009 +0000
+++ b/sys/arch/i386/stand/pxeboot/main.c        Sun Dec 13 23:01:42 2009 +0000
@@ -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");
diff -r 4c67254ccf31 -r f0bddb2e5b65 sys/arch/i386/stand/pxeboot/pxe.c
--- a/sys/arch/i386/stand/pxeboot/pxe.c Sun Dec 13 21:16:54 2009 +0000
+++ b/sys/arch/i386/stand/pxeboot/pxe.c Sun Dec 13 23:01:42 2009 +0000
@@ -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)
 {
diff -r 4c67254ccf31 -r f0bddb2e5b65 sys/arch/i386/stand/pxeboot/pxe_netif.h
--- a/sys/arch/i386/stand/pxeboot/pxe_netif.h   Sun Dec 13 21:16:54 2009 +0000
+++ b/sys/arch/i386/stand/pxeboot/pxe_netif.h   Sun Dec 13 23:01:42 2009 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index