Source-Changes-HG archive

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

[src/trunk]: src/sys/arch cope with removal of this sick NENTS macro from lib...



details:   https://anonhg.NetBSD.org/src/rev/17ab1fea3de9
branches:  trunk
changeset: 544161:17ab1fea3de9
user:      drochner <drochner%NetBSD.org@localhost>
date:      Thu Mar 13 13:35:55 2003 +0000

description:
cope with removal of this sick NENTS macro from libsa/netif.h

diffstat:

 sys/arch/alpha/stand/netboot/if_prom.c |   4 ++--
 sys/arch/hp300/stand/common/if_le.c    |  10 ++++++----
 sys/arch/next68k/stand/boot/conf.c     |   6 +++---
 sys/arch/next68k/stand/boot/en.c       |   4 ++--
 4 files changed, 13 insertions(+), 11 deletions(-)

diffs (97 lines):

diff -r 5c805568c7d3 -r 17ab1fea3de9 sys/arch/alpha/stand/netboot/if_prom.c
--- a/sys/arch/alpha/stand/netboot/if_prom.c    Thu Mar 13 13:19:01 2003 +0000
+++ b/sys/arch/alpha/stand/netboot/if_prom.c    Thu Mar 13 13:35:55 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_prom.c,v 1.17 2002/11/09 06:34:38 thorpej Exp $ */
+/* $NetBSD: if_prom.c,v 1.18 2003/03/13 13:35:55 drochner Exp $ */
 
 /*
  * Copyright (c) 1997 Christopher G. Demetriou.  All rights reserved.
@@ -54,7 +54,7 @@
 {      0,              1,              &prom_stats[0], 0,              },
 };
 
-struct netif_stats prom_stats[NENTS(prom_ifs)];
+struct netif_stats prom_stats[sizeof(prom_ifs) / sizeof(prom_ifs[0])];
 
 struct netbbinfo netbbinfo = {
        0xfeedbabedeadbeef,                     /* magic number */
diff -r 5c805568c7d3 -r 17ab1fea3de9 sys/arch/hp300/stand/common/if_le.c
--- a/sys/arch/hp300/stand/common/if_le.c       Thu Mar 13 13:19:01 2003 +0000
+++ b/sys/arch/hp300/stand/common/if_le.c       Thu Mar 13 13:35:55 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_le.c,v 1.5 2002/09/27 15:36:02 provos Exp $ */
+/*     $NetBSD: if_le.c,v 1.6 2003/03/13 13:37:15 drochner Exp $       */
 
 /*
  * Copyright (c) 1993 Adam Glass
@@ -70,15 +70,17 @@
 /* offsets for:           ID   REGS     MEM   NVRAM    le_heat le_bonus*/
 {                  0,  0x4000, 0x8000, 0xC008, 1,      10   }
 };
+#define NLE0CONF (sizeof(le0conf) / sizeof(le0conf[0]))
 
 extern struct netif_stats      le_stats[];
 
 struct netif_dif le_ifs[] = {
 /*     dif_unit        dif_nsel        dif_stats       dif_private     */
-{      0,              NENTS(le0conf), &le_stats[0],   le0conf,        },
+{      0,              NLE0CONF,       &le_stats[0],   le0conf,        },
 };
+#define NLE_IFS (sizeof(le_ifs) / sizeof(le_ifs[0]))
 
-struct netif_stats le_stats[NENTS(le_ifs)];
+struct netif_stats le_stats[NLE_IFS];
 
 struct netif_driver le_driver = {
        "le",                   /* netif_bname */
@@ -89,7 +91,7 @@
        le_put,                 /* netif_put */
        le_end,                 /* netif_end */
        le_ifs,                 /* netif_ifs */
-       NENTS(le_ifs)           /* netif_nifs */
+       NLE_IFS                 /* netif_nifs */
 };
 
 struct le_softc {
diff -r 5c805568c7d3 -r 17ab1fea3de9 sys/arch/next68k/stand/boot/conf.c
--- a/sys/arch/next68k/stand/boot/conf.c        Thu Mar 13 13:19:01 2003 +0000
+++ b/sys/arch/next68k/stand/boot/conf.c        Thu Mar 13 13:35:55 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.2 2002/07/11 16:03:17 christos Exp $        */
+/*     $NetBSD: conf.c,v 1.3 2003/03/13 13:40:53 drochner Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -88,11 +88,11 @@
        { nfs_open, nfs_close, nfs_read, nfs_write, nfs_seek, nfs_stat },
 };
 
-int nfsys = NENTS(file_system);
+int nfsys = sizeof(file_system) / sizeof(file_system[0]);
 
 extern struct netif_driver en_driver;
 
 struct netif_driver *netif_drivers[] = {
        &en_driver,
 };
-int n_netif_drivers = NENTS(netif_drivers);
+int n_netif_drivers = sizeof(netif_drivers) / sizeof(netif_drivers[0]);
diff -r 5c805568c7d3 -r 17ab1fea3de9 sys/arch/next68k/stand/boot/en.c
--- a/sys/arch/next68k/stand/boot/en.c  Thu Mar 13 13:19:01 2003 +0000
+++ b/sys/arch/next68k/stand/boot/en.c  Thu Mar 13 13:35:55 2003 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: en.c,v 1.8 2002/09/11 13:15:59 mycroft Exp $        */
+/*      $NetBSD: en.c,v 1.9 2003/03/13 13:44:05 drochner Exp $        */
 /*
  * Copyright (c) 1996 Rolf Grossmann
  * All rights reserved.
@@ -78,7 +78,7 @@
 struct netif_driver en_driver = {
        "en",
        en_match, en_probe, en_init, en_get, en_put, en_end,
-       en_ifs, NENTS(en_ifs)
+       en_ifs, sizeof(en_ifs) / sizeof(en_ifs[0])
 };
 
 extern int turbo;



Home | Main Index | Thread Index | Old Index