Source-Changes-HG archive

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

[src/trunk]: src/sys Call etherinit from ifinit1 only when it is required



details:   https://anonhg.NetBSD.org/src/rev/4726566c2bf6
branches:  trunk
changeset: 331074:4726566c2bf6
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Wed Jul 30 13:32:09 2014 +0000

description:
Call etherinit from ifinit1 only when it is required

This unbreaks the builds of kernels that don't build if_ethersubr.c.

diffstat:

 sys/conf/files                             |   4 ++--
 sys/net/if.c                               |  11 +++++++++--
 sys/rump/net/lib/libnetinet/opt/ether.h    |   3 +++
 sys/rump/net/lib/libnetinet/opt/opt_wlan.h |   3 +++
 4 files changed, 17 insertions(+), 4 deletions(-)

diffs (77 lines):

diff -r cdfc7e185857 -r 4726566c2bf6 sys/conf/files
--- a/sys/conf/files    Wed Jul 30 13:31:17 2014 +0000
+++ b/sys/conf/files    Wed Jul 30 13:32:09 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files,v 1.1094 2014/07/16 18:22:23 bouyer Exp $
+#      $NetBSD: files,v 1.1095 2014/07/30 13:32:09 ozaki-r Exp $
 #      @(#)files.newconf       7.5 (Berkeley) 5/10/93
 
 version        20100430
@@ -1708,7 +1708,7 @@
 file   net/if_ecosubr.c                eco
 file   net/if_etherip.c                etherip                 needs-flag
 file   net/if_ethersubr.c              ether | fddi | netatalk | token |
-                                           wlan
+                                           wlan                needs-flag
 file   net/if_faith.c                  faith & (inet | inet6)  needs-flag
 file   net/if_fddisubr.c               fddi                    needs-flag
 file   net/if_gif.c                    gif                     needs-flag
diff -r cdfc7e185857 -r 4726566c2bf6 sys/net/if.c
--- a/sys/net/if.c      Wed Jul 30 13:31:17 2014 +0000
+++ b/sys/net/if.c      Wed Jul 30 13:32:09 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.287 2014/07/29 05:56:58 ozaki-r Exp $ */
+/*     $NetBSD: if.c,v 1.288 2014/07/30 13:32:09 ozaki-r Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,12 +90,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.287 2014/07/29 05:56:58 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.288 2014/07/30 13:32:09 ozaki-r Exp $");
 
 #include "opt_inet.h"
 
 #include "opt_atalk.h"
 #include "opt_natm.h"
+#include "opt_wlan.h"
 
 #include <sys/param.h>
 #include <sys/mbuf.h>
@@ -138,6 +139,10 @@
 #include <netinet6/nd6.h>
 #endif
 
+#include "ether.h"
+#include "fddi.h"
+#include "token.h"
+
 #include "carp.h"
 #if NCARP > 0
 #include <netinet/ip_carp.h>
@@ -253,7 +258,9 @@
        if_pfil = pfil_head_create(PFIL_TYPE_IFNET, NULL);
        KASSERT(if_pfil != NULL);
 
+#if NETHER > 0 || NFDDI > 0 || defined(NETATALK) || NTOKEN > 0 || defined(WLAN)
        etherinit();
+#endif
 }
 
 ifnet_t *
diff -r cdfc7e185857 -r 4726566c2bf6 sys/rump/net/lib/libnetinet/opt/ether.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libnetinet/opt/ether.h   Wed Jul 30 13:32:09 2014 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: ether.h,v 1.1 2014/07/30 13:32:09 ozaki-r Exp $        */
+
+/* dummy */
diff -r cdfc7e185857 -r 4726566c2bf6 sys/rump/net/lib/libnetinet/opt/opt_wlan.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libnetinet/opt/opt_wlan.h        Wed Jul 30 13:32:09 2014 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: opt_wlan.h,v 1.1 2014/07/30 13:32:09 ozaki-r Exp $     */
+
+/* dummy */



Home | Main Index | Thread Index | Old Index