diff options
Diffstat (limited to 'sys/arch/amd64')
-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 724c6cd3c4a..e5416d18a98 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.16 2010/12/06 18:44:49 jasper Exp $ */ +/* $OpenBSD: conf.c,v 1.17 2010/12/06 22:11:01 jasper Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -56,10 +56,10 @@ void (*i386_probe2[])(void) = { }; struct i386_boot_probes probe_list[] = { - { "probing", i386_probe1, nitems(i386_probe1) }, - { "disk", i386_probe2, nitems(i386_probe2) } + { "probing", i386_probe1, NENTS(i386_probe1) }, + { "disk", i386_probe2, NENTS(i386_probe2) } }; -int nibprobes = nitems(probe_list); +int nibprobes = NENTS(probe_list); struct fs_ops file_system[] = { @@ -74,7 +74,7 @@ struct fs_ops file_system[] = { cd9660_stat, cd9660_readdir }, #endif }; -int nfsys = nitems(file_system); +int nfsys = NENTS(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 = nitems(devsw); +int ndevs = NENTS(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 7b50da459d1..418fd239c68 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.16 2010/12/06 18:44:49 jasper Exp $ */ +/* $OpenBSD: conf.c,v 1.17 2010/12/06 22:11:01 jasper Exp $ */ /* * Copyright (c) 2004 Tom Cosgrove @@ -57,10 +57,10 @@ void (*amd64_probe2[])(void) = { }; struct i386_boot_probes probe_list[] = { - { "probing", amd64_probe1, nitems(amd64_probe1) }, - { "disk", amd64_probe2, nitems(amd64_probe2) } + { "probing", amd64_probe1, NENTS(amd64_probe1) }, + { "disk", amd64_probe2, NENTS(amd64_probe2) } }; -int nibprobes = nitems(probe_list); +int nibprobes = NENTS(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 = nitems(file_system); +int nfsys = NENTS(file_system); struct devsw devsw[] = { { "BIOS", biosstrategy, biosopen, biosclose, biosioctl }, }; -int ndevs = nitems(devsw); +int ndevs = NENTS(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 f8757073289..4136e472b55 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.4 2010/12/06 18:44:49 jasper Exp $ */ +/* $OpenBSD: dev_i386.c,v 1.5 2010/12/06 22:11:01 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 = nitems(bdevs); +const int nbdevs = NENTS(bdevs); const char cdevs[][4] = { "cn", "", "", "", "", "", "", "", "com", "", "", "", "pc" }; -const int ncdevs = nitems(cdevs); +const int ncdevs = NENTS(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 7043d0716b3..72cfe9320f8 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.8 2010/12/06 18:44:49 jasper Exp $ */ +/* $OpenBSD: memprobe.c,v 1.9 2010/12/06 22:11:01 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[nitems(addrprobe_pat)]; + u_int save[NENTS(addrprobe_pat)]; /* Get location */ loc = (int *)(kloc * 1024); save[0] = *loc; /* Probe address */ - for(i = 0; i < nitems(addrprobe_pat); i++){ + for(i = 0; i < NENTS(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 < nitems(addrprobe_pat); i++) { + for(i = 0; i < NENTS(addrprobe_pat); i++) { save[i] = loc[i]; loc[i] = addrprobe_pat[i]; } /* Read address */ - for(i = 0; i < nitems(addrprobe_pat); i++) { + for(i = 0; i < NENTS(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 24e62ad883a..9339e10aa0f 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.20 2010/12/06 18:44:49 jasper Exp $ */ +/* $OpenBSD: conf.c,v 1.21 2010/12/06 22:11:01 jasper Exp $ */ /* * Copyright (c) 2004 Tom Cosgrove @@ -65,17 +65,17 @@ void (*i386_probe3[])(void) = { }; struct i386_boot_probes probe_list[] = { - { "probing", i386_probe1, nitems(i386_probe1) }, - { "disk", i386_probe2, nitems(i386_probe2) }, - { "net", i386_probe3, nitems(i386_probe3) }, + { "probing", i386_probe1, NENTS(i386_probe1) }, + { "disk", i386_probe2, NENTS(i386_probe2) }, + { "net", i386_probe3, NENTS(i386_probe3) }, }; -int nibprobes = nitems(probe_list); +int nibprobes = NENTS(probe_list); /* This next list must match file_system[]. */ char *fs_name[] = { NULL, "tftp", "nfs" }; -int nfsname = nitems(fs_name); +int nfsname = NENTS(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 = nitems(file_system); +int nfsys = NENTS(file_system); struct devsw devsw[] = { #ifdef _TEST @@ -104,7 +104,7 @@ struct devsw devsw[] = { { "BIOS", biosstrategy, biosopen, biosclose, biosioctl }, #endif }; -int ndevs = nitems(devsw); +int ndevs = NENTS(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 = nitems(netif_drivers); +int n_netif_drivers = NENTS(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 9e4e51706a9..87d7f8a34b1 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.5 2010/12/06 18:44:49 jasper Exp $ */ +/* $OpenBSD: devopen.c,v 1.6 2010/12/06 22:11:01 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 = nitems(bdevs); +const int nbdevs = NENTS(bdevs); const char cdevs[][4] = { "cn", "", "", "", "", "", "", "", "com", "", "", "", "pc" }; -const int ncdevs = nitems(cdevs); +const int ncdevs = NENTS(cdevs); /* pass dev_t to the open routines */ int |