summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand/libsa
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/amd64/stand/libsa')
-rw-r--r--sys/arch/amd64/stand/libsa/dev_i386.c6
-rw-r--r--sys/arch/amd64/stand/libsa/memprobe.c10
2 files changed, 8 insertions, 8 deletions
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];