Move "range" property description out of generic `romaux'.

Add getproplen() function.
This commit is contained in:
pk 1997-04-08 20:08:53 +00:00
parent cc7899605a
commit 242d365b70
1 changed files with 14 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.70 1997/03/31 17:21:00 mycroft Exp $ */
/* $NetBSD: autoconf.c,v 1.71 1997/04/08 20:08:53 pk Exp $ */
/*
* Copyright (c) 1996
@ -1022,17 +1022,6 @@ romprop(rp, cp, node)
#endif
}
#if defined(SUN4M)
if (CPU_ISSUN4M) {
len = getprop(node, "ranges", (void *)&rp->ra_range,
sizeof rp->ra_range);
if (len == -1)
len = 0;
rp->ra_nrange = len / sizeof(struct rom_range);
} else
#endif
rp->ra_nrange = 0;
return (1);
}
@ -1502,6 +1491,19 @@ getprop(node, name, buf, bufsiz)
#endif
}
/*
* Internal form of proplen(). Returns the property length.
*/
int
getproplen(node, name)
int node;
char *name;
{
register struct nodeops *no = promvec->pv_nodeops;
return (no->no_proplen(node, name));
}
/*
* Return a string property. There is a (small) limit on the length;
* the string is fetched into a static buffer which is overwritten on