summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2010-12-06 18:44:50 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2010-12-06 18:44:50 +0000
commitc35b9bdae7316474e01b5a2ba9dcf3631b975901 (patch)
treee2584f7866a69b7d5115c88c8916474d2dc7c70b /sys/arch/i386
parentadc400522ede0d3382b10f47167d1652125bd6e6 (diff)
- drop NENTS(), which was yet another copy of nitems().
no binary change ok deraadt@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/stand/boot/conf.c14
-rw-r--r--sys/arch/i386/stand/cdboot/conf.c12
-rw-r--r--sys/arch/i386/stand/libsa/debug.c4
-rw-r--r--sys/arch/i386/stand/libsa/dev_i386.c6
-rw-r--r--sys/arch/i386/stand/libsa/memprobe.c10
-rw-r--r--sys/arch/i386/stand/pxeboot/conf.c18
-rw-r--r--sys/arch/i386/stand/pxeboot/devopen.c6
7 files changed, 35 insertions, 35 deletions
diff --git a/sys/arch/i386/stand/boot/conf.c b/sys/arch/i386/stand/boot/conf.c
index 9a0b970cef9..97ecb428a85 100644
--- a/sys/arch/i386/stand/boot/conf.c
+++ b/sys/arch/i386/stand/boot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.41 2010/08/11 14:18:52 deraadt Exp $ */
+/* $OpenBSD: conf.c,v 1.42 2010/12/06 18:44:49 jasper Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -58,10 +58,10 @@ void (*i386_probe2[])(void) = {
};
struct i386_boot_probes probe_list[] = {
- { "probing", i386_probe1, NENTS(i386_probe1) },
- { "disk", i386_probe2, NENTS(i386_probe2) }
+ { "probing", i386_probe1, nitems(i386_probe1) },
+ { "disk", i386_probe2, nitems(i386_probe2) }
};
-int nibprobes = NENTS(probe_list);
+int nibprobes = nitems(probe_list);
struct fs_ops file_system[] = {
@@ -80,7 +80,7 @@ struct fs_ops file_system[] = {
null_stat, null_readdir }
#endif
};
-int nfsys = NENTS(file_system);
+int nfsys = nitems(file_system);
struct devsw devsw[] = {
#ifdef _TEST
@@ -92,13 +92,13 @@ struct devsw devsw[] = {
{ "TFTP", tftpstrategy, tftpopen, tftpclose, tftpioctl },
#endif
};
-int ndevs = NENTS(devsw);
+int ndevs = nitems(devsw);
#ifdef notdef
struct netif_driver *netif_drivers[] = {
NULL
};
-int n_netif_drivers = NENTS(netif_drivers);
+int n_netif_drivers = nitems(netif_drivers);
#endif
struct consdev constab[] = {
diff --git a/sys/arch/i386/stand/cdboot/conf.c b/sys/arch/i386/stand/cdboot/conf.c
index 29cfb25c204..cf0261990fb 100644
--- a/sys/arch/i386/stand/cdboot/conf.c
+++ b/sys/arch/i386/stand/cdboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.13 2010/08/11 14:18:52 deraadt Exp $ */
+/* $OpenBSD: conf.c,v 1.14 2010/12/06 18:44:49 jasper Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -61,10 +61,10 @@ void (*i386_probe2[])(void) = {
};
struct i386_boot_probes probe_list[] = {
- { "probing", i386_probe1, NENTS(i386_probe1) },
- { "disk", i386_probe2, NENTS(i386_probe2) },
+ { "probing", i386_probe1, nitems(i386_probe1) },
+ { "disk", i386_probe2, nitems(i386_probe2) },
};
-int nibprobes = NENTS(probe_list);
+int nibprobes = nitems(probe_list);
struct fs_ops file_system[] = {
{ ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek,
@@ -84,7 +84,7 @@ struct fs_ops file_system[] = {
null_stat, null_readdir }
#endif
};
-int nfsys = NENTS(file_system);
+int nfsys = nitems(file_system);
struct devsw devsw[] = {
#ifdef _TEST
@@ -93,7 +93,7 @@ struct devsw devsw[] = {
{ "BIOS", biosstrategy, biosopen, biosclose, biosioctl },
#endif
};
-int ndevs = NENTS(devsw);
+int ndevs = nitems(devsw);
struct consdev constab[] = {
#ifdef _TEST
diff --git a/sys/arch/i386/stand/libsa/debug.c b/sys/arch/i386/stand/libsa/debug.c
index 23472281b0d..ae196e01008 100644
--- a/sys/arch/i386/stand/libsa/debug.c
+++ b/sys/arch/i386/stand/libsa/debug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: debug.c,v 1.13 2004/03/09 19:12:12 tom Exp $ */
+/* $OpenBSD: debug.c,v 1.14 2010/12/06 18:44:49 jasper Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -34,7 +34,7 @@
#define VBASE (0xb8000)
char *const reg_names[] = { REG_NAMES };
-const int nreg = NENTS(reg_names);
+const int nreg = nitems(reg_names);
struct reg reg;
u_int32_t *const reg_values[] = { REG_VALUES(reg) };
char *const trap_names[] = { TRAP_NAMES };
diff --git a/sys/arch/i386/stand/libsa/dev_i386.c b/sys/arch/i386/stand/libsa/dev_i386.c
index d2ec3f7945c..013b0b1e810 100644
--- a/sys/arch/i386/stand/libsa/dev_i386.c
+++ b/sys/arch/i386/stand/libsa/dev_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev_i386.c,v 1.30 2007/06/27 20:29:37 mk Exp $ */
+/* $OpenBSD: dev_i386.c,v 1.31 2010/12/06 18:44:49 jasper Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
@@ -38,13 +38,13 @@ const char bdevs[][4] = {
"wd", "", "fd", "", "sd", "st", "cd", "mcd",
"", "", "", "", "", "", "", "scd", "", "hd", ""
};
-const int nbdevs = NENTS(bdevs);
+const int nbdevs = nitems(bdevs);
const char cdevs[][4] = {
"cn", "", "", "", "", "", "", "",
"com", "", "", "", "pc"
};
-const int ncdevs = NENTS(cdevs);
+const int ncdevs = nitems(cdevs);
/* pass dev_t to the open routines */
int
diff --git a/sys/arch/i386/stand/libsa/memprobe.c b/sys/arch/i386/stand/libsa/memprobe.c
index 063f048e440..ca75a405ae6 100644
--- a/sys/arch/i386/stand/libsa/memprobe.c
+++ b/sys/arch/i386/stand/libsa/memprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: memprobe.c,v 1.47 2010/07/02 00:36:52 weingart Exp $ */
+/* $OpenBSD: memprobe.c,v 1.48 2010/12/06 18:44:49 jasper Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -224,14 +224,14 @@ addrprobe(u_int kloc)
{
__volatile u_int *loc;
register u_int i, ret = 0;
- u_int save[NENTS(addrprobe_pat)];
+ u_int save[nitems(addrprobe_pat)];
/* Get location */
loc = (int *)(kloc * 1024);
save[0] = *loc;
/* Probe address */
- for (i = 0; i < NENTS(addrprobe_pat); i++) {
+ for (i = 0; i < nitems(addrprobe_pat); i++) {
*loc = addrprobe_pat[i];
if (*loc != addrprobe_pat[i])
ret++;
@@ -240,13 +240,13 @@ addrprobe(u_int kloc)
if (!ret) {
/* Write address */
- for (i = 0; i < NENTS(addrprobe_pat); i++) {
+ for (i = 0; i < nitems(addrprobe_pat); i++) {
save[i] = loc[i];
loc[i] = addrprobe_pat[i];
}
/* Read address */
- for (i = 0; i < NENTS(addrprobe_pat); i++) {
+ for (i = 0; i < nitems(addrprobe_pat); i++) {
if (loc[i] != addrprobe_pat[i])
ret++;
loc[i] = save[i];
diff --git a/sys/arch/i386/stand/pxeboot/conf.c b/sys/arch/i386/stand/pxeboot/conf.c
index 82c90624387..672e897e303 100644
--- a/sys/arch/i386/stand/pxeboot/conf.c
+++ b/sys/arch/i386/stand/pxeboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.18 2010/08/11 14:18:52 deraadt Exp $ */
+/* $OpenBSD: conf.c,v 1.19 2010/12/06 18:44:49 jasper Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -67,17 +67,17 @@ void (*i386_probe3[])(void) = {
};
struct i386_boot_probes probe_list[] = {
- { "probing", i386_probe1, NENTS(i386_probe1) },
- { "disk", i386_probe2, NENTS(i386_probe2) },
- { "net", i386_probe3, NENTS(i386_probe3) },
+ { "probing", i386_probe1, nitems(i386_probe1) },
+ { "disk", i386_probe2, nitems(i386_probe2) },
+ { "net", i386_probe3, nitems(i386_probe3) },
};
-int nibprobes = NENTS(probe_list);
+int nibprobes = nitems(probe_list);
/* This next list must match file_system[]. */
char *fs_name[] = {
NULL, "tftp", "nfs"
};
-int nfsname = NENTS(fs_name);
+int nfsname = nitems(fs_name);
struct fs_ops file_system[] = {
{ ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek,
@@ -97,7 +97,7 @@ struct fs_ops file_system[] = {
null_stat, null_readdir }
#endif
};
-int nfsys = NENTS(file_system);
+int nfsys = nitems(file_system);
struct devsw devsw[] = {
#ifdef _TEST
@@ -106,7 +106,7 @@ struct devsw devsw[] = {
{ "BIOS", biosstrategy, biosopen, biosclose, biosioctl },
#endif
};
-int ndevs = NENTS(devsw);
+int ndevs = nitems(devsw);
struct devsw netsw[] = {
{ "net", net_strategy, net_open, net_close, net_ioctl },
@@ -114,7 +114,7 @@ struct devsw netsw[] = {
struct netif_driver *netif_drivers[] = {
};
-int n_netif_drivers = NENTS(netif_drivers);
+int n_netif_drivers = nitems(netif_drivers);
struct consdev constab[] = {
#ifdef _TEST
diff --git a/sys/arch/i386/stand/pxeboot/devopen.c b/sys/arch/i386/stand/pxeboot/devopen.c
index 836329474f1..9e4e51706a9 100644
--- a/sys/arch/i386/stand/pxeboot/devopen.c
+++ b/sys/arch/i386/stand/pxeboot/devopen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: devopen.c,v 1.4 2007/07/27 17:46:57 tom Exp $ */
+/* $OpenBSD: devopen.c,v 1.5 2010/12/06 18:44:49 jasper Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -45,13 +45,13 @@ const char bdevs[][4] = {
"wd", "", "fd", "", "sd", "st", "cd", "mcd",
"", "", "", "", "", "", "", "scd", "", "hd", ""
};
-const int nbdevs = NENTS(bdevs);
+const int nbdevs = nitems(bdevs);
const char cdevs[][4] = {
"cn", "", "", "", "", "", "", "",
"com", "", "", "", "pc"
};
-const int ncdevs = NENTS(cdevs);
+const int ncdevs = nitems(cdevs);
/* pass dev_t to the open routines */
int