diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-12-06 18:44:50 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-12-06 18:44:50 +0000 |
commit | c35b9bdae7316474e01b5a2ba9dcf3631b975901 (patch) | |
tree | e2584f7866a69b7d5115c88c8916474d2dc7c70b /sys/arch/amd64/stand | |
parent | adc400522ede0d3382b10f47167d1652125bd6e6 (diff) |
- drop NENTS(), which was yet another copy of nitems().
no binary change
ok deraadt@
Diffstat (limited to 'sys/arch/amd64/stand')
-rw-r--r-- | sys/arch/amd64/stand/boot/conf.c | 12 | ||||
-rw-r--r-- | sys/arch/amd64/stand/cdboot/conf.c | 12 | ||||
-rw-r--r-- | sys/arch/amd64/stand/libsa/dev_i386.c | 6 | ||||
-rw-r--r-- | sys/arch/amd64/stand/libsa/memprobe.c | 10 | ||||
-rw-r--r-- | sys/arch/amd64/stand/pxeboot/conf.c | 18 | ||||
-rw-r--r-- | sys/arch/amd64/stand/pxeboot/devopen.c | 6 |
6 files changed, 32 insertions, 32 deletions
diff --git a/sys/arch/amd64/stand/boot/conf.c b/sys/arch/amd64/stand/boot/conf.c index 212c8c529a0..724c6cd3c4a 100644 --- a/sys/arch/amd64/stand/boot/conf.c +++ b/sys/arch/amd64/stand/boot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.15 2010/08/11 14:18:52 deraadt Exp $ */ +/* $OpenBSD: conf.c,v 1.16 2010/12/06 18:44:49 jasper Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -56,10 +56,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[] = { @@ -74,7 +74,7 @@ struct fs_ops file_system[] = { cd9660_stat, cd9660_readdir }, #endif }; -int nfsys = NENTS(file_system); +int nfsys = nitems(file_system); struct devsw devsw[] = { { "BIOS", biosstrategy, biosopen, biosclose, biosioctl }, @@ -82,7 +82,7 @@ struct devsw devsw[] = { { "TFTP", tftpstrategy, tftpopen, tftpclose, tftpioctl }, #endif }; -int ndevs = NENTS(devsw); +int ndevs = nitems(devsw); struct consdev constab[] = { { pc_probe, pc_init, pc_getc, pc_putc }, diff --git a/sys/arch/amd64/stand/cdboot/conf.c b/sys/arch/amd64/stand/cdboot/conf.c index 42a39f8fe7b..7b50da459d1 100644 --- a/sys/arch/amd64/stand/cdboot/conf.c +++ b/sys/arch/amd64/stand/cdboot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.15 2010/08/11 14:18:52 deraadt Exp $ */ +/* $OpenBSD: conf.c,v 1.16 2010/12/06 18:44:49 jasper Exp $ */ /* * Copyright (c) 2004 Tom Cosgrove @@ -57,10 +57,10 @@ void (*amd64_probe2[])(void) = { }; struct i386_boot_probes probe_list[] = { - { "probing", amd64_probe1, NENTS(amd64_probe1) }, - { "disk", amd64_probe2, NENTS(amd64_probe2) } + { "probing", amd64_probe1, nitems(amd64_probe1) }, + { "disk", amd64_probe2, nitems(amd64_probe2) } }; -int nibprobes = NENTS(probe_list); +int nibprobes = nitems(probe_list); struct fs_ops file_system[] = { { cd9660_open, cd9660_close, cd9660_read, cd9660_write, cd9660_seek, @@ -76,12 +76,12 @@ struct fs_ops file_system[] = { fat_stat, fat_readdir }, #endif }; -int nfsys = NENTS(file_system); +int nfsys = nitems(file_system); struct devsw devsw[] = { { "BIOS", biosstrategy, biosopen, biosclose, biosioctl }, }; -int ndevs = NENTS(devsw); +int ndevs = nitems(devsw); struct consdev constab[] = { { pc_probe, pc_init, pc_getc, pc_putc }, diff --git a/sys/arch/amd64/stand/libsa/dev_i386.c b/sys/arch/amd64/stand/libsa/dev_i386.c index dc7edbb120f..f8757073289 100644 --- a/sys/arch/amd64/stand/libsa/dev_i386.c +++ b/sys/arch/amd64/stand/libsa/dev_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_i386.c,v 1.3 2007/06/27 20:29:37 mk Exp $ */ +/* $OpenBSD: dev_i386.c,v 1.4 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/amd64/stand/libsa/memprobe.c b/sys/arch/amd64/stand/libsa/memprobe.c index 72224813324..7043d0716b3 100644 --- a/sys/arch/amd64/stand/libsa/memprobe.c +++ b/sys/arch/amd64/stand/libsa/memprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memprobe.c,v 1.7 2010/07/02 00:36:52 weingart Exp $ */ +/* $OpenBSD: memprobe.c,v 1.8 2010/12/06 18:44:49 jasper Exp $ */ /* * Copyright (c) 1997-1999 Michael Shalayeff @@ -221,14 +221,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++; @@ -237,13 +237,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/amd64/stand/pxeboot/conf.c b/sys/arch/amd64/stand/pxeboot/conf.c index f5e6e7a4957..24e62ad883a 100644 --- a/sys/arch/amd64/stand/pxeboot/conf.c +++ b/sys/arch/amd64/stand/pxeboot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.19 2010/08/11 14:18:52 deraadt Exp $ */ +/* $OpenBSD: conf.c,v 1.20 2010/12/06 18:44:49 jasper Exp $ */ /* * Copyright (c) 2004 Tom Cosgrove @@ -65,17 +65,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, @@ -95,7 +95,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 @@ -104,7 +104,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 }, @@ -112,7 +112,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/amd64/stand/pxeboot/devopen.c b/sys/arch/amd64/stand/pxeboot/devopen.c index f6ba14639ac..9e4e51706a9 100644 --- a/sys/arch/amd64/stand/pxeboot/devopen.c +++ b/sys/arch/amd64/stand/pxeboot/devopen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: devopen.c,v 1.4 2007/07/27 17:48:01 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 |