diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-12-06 22:11:02 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-12-06 22:11:02 +0000 |
commit | a71c133efb7026da05ac2f7f41a6926bc5824a63 (patch) | |
tree | caa8cefa19803b9912219905c5cc1f2499bb0544 /sys/arch/hppa/stand | |
parent | 2131988aa3472105a2067d04c42151159fe3515d (diff) |
- partially revert previous NENTS removal for arches which got busted.
Diffstat (limited to 'sys/arch/hppa/stand')
-rw-r--r-- | sys/arch/hppa/stand/boot/conf.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa/stand/cdboot/cdboot.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/cmd_hppa.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa/stand/libsa/dev_hppa.c | 8 |
4 files changed, 13 insertions, 13 deletions
diff --git a/sys/arch/hppa/stand/boot/conf.c b/sys/arch/hppa/stand/boot/conf.c index e98425e5575..1f43e10553f 100644 --- a/sys/arch/hppa/stand/boot/conf.c +++ b/sys/arch/hppa/stand/boot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.23 2010/12/06 18:44:49 jasper Exp $ */ +/* $OpenBSD: conf.c,v 1.24 2010/12/06 22:11:01 jasper Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -43,14 +43,14 @@ struct fs_ops file_system[] = { { lif_open, lif_close, lif_read, lif_write, lif_seek, lif_stat, lif_readdir }, }; -int nfsys = nitems(file_system); +int nfsys = NENTS(file_system); struct devsw devsw[] = { { "dk", iodcstrategy, dkopen, dkclose, noioctl }, { "ct", iodcstrategy, ctopen, ctclose, noioctl }, { "lf", iodcstrategy, lfopen, lfclose, noioctl } }; -int ndevs = nitems(devsw); +int ndevs = NENTS(devsw); struct consdev constab[] = { { ite_probe, ite_init, ite_getc, ite_putc }, diff --git a/sys/arch/hppa/stand/cdboot/cdboot.c b/sys/arch/hppa/stand/cdboot/cdboot.c index 4780419ee60..813884fec57 100644 --- a/sys/arch/hppa/stand/cdboot/cdboot.c +++ b/sys/arch/hppa/stand/cdboot/cdboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cdboot.c,v 1.8 2010/12/06 18:44:49 jasper Exp $ */ +/* $OpenBSD: cdboot.c,v 1.9 2010/12/06 22:11:01 jasper Exp $ */ /* * Copyright (c) 2003 Michael Shalayeff @@ -46,12 +46,12 @@ struct fs_ops file_system[] = { { cd9660_open, cd9660_close, cd9660_read, cd9660_write, cd9660_seek, cd9660_stat, cd9660_readdir }, }; -int nfsys = nitems(file_system); +int nfsys = NENTS(file_system); struct devsw devsw[] = { { "dk", iodcstrategy, dkopen, dkclose, noioctl }, }; -int ndevs = nitems(devsw); +int ndevs = NENTS(devsw); struct consdev constab[] = { { ite_probe, ite_init, ite_getc, ite_putc }, diff --git a/sys/arch/hppa/stand/libsa/cmd_hppa.c b/sys/arch/hppa/stand/libsa/cmd_hppa.c index cc8f7255d8a..2a6f6ecf72e 100644 --- a/sys/arch/hppa/stand/libsa/cmd_hppa.c +++ b/sys/arch/hppa/stand/libsa/cmd_hppa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd_hppa.c,v 1.10 2010/12/06 18:44:49 jasper Exp $ */ +/* $OpenBSD: cmd_hppa.c,v 1.11 2010/12/06 22:11:01 jasper Exp $ */ /* * Copyright (c) 2002, 2009 Miodrag Vallat @@ -331,13 +331,13 @@ set_serial(console, port, arg) speed = 0; if (arg == NULL || *arg == '\0') { - for (i = 0; i < nitems(i_speeds); i++) + for (i = 0; i < NENTS(i_speeds); i++) if (i_speeds[i] == 9600) { speed = i; break; } } else { - for (i = 0; i < nitems(c_speeds); i++) + for (i = 0; i < NENTS(c_speeds); i++) if (strcmp(arg, c_speeds[i]) == 0) { speed = i; break; diff --git a/sys/arch/hppa/stand/libsa/dev_hppa.c b/sys/arch/hppa/stand/libsa/dev_hppa.c index f9c36fe3144..1199976c7d9 100644 --- a/sys/arch/hppa/stand/libsa/dev_hppa.c +++ b/sys/arch/hppa/stand/libsa/dev_hppa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_hppa.c,v 1.12 2010/12/06 18:44:49 jasper Exp $ */ +/* $OpenBSD: dev_hppa.c,v 1.13 2010/12/06 22:11:01 jasper Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -42,7 +42,7 @@ const char cdevs[][4] = { "ite", "", "", "", "", "", "", "", "", "", "", "", "" }; -const int ncdevs = nitems(cdevs); +const int ncdevs = NENTS(cdevs); const struct pdc_devs { char name[3]; @@ -78,11 +78,11 @@ devopen(f, fname, file) printf("devopen: "); #endif - for (dp = pdc_devs; dp < &pdc_devs[nitems(pdc_devs)]; dp++) + for (dp = pdc_devs; dp < &pdc_devs[NENTS(pdc_devs)]; dp++) if (!strncmp(fname, dp->name, sizeof(dp->name)-1)) break; - if (dp >= &pdc_devs[nitems(pdc_devs)] || dp->dev_type < 0) + if (dp >= &pdc_devs[NENTS(pdc_devs)] || dp->dev_type < 0) return ENODEV; #ifdef DEBUGBUG if (debug) |