4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
30 * Stuff for mucking about with properties
33 #include <sys/promif.h>
34 #include <sys/promimpl.h>
35 #include <sys/prom_emul.h>
38 prom_getproplen(pnode_t nodeid
, caddr_t name
)
40 return (promif_getproplen(nodeid
, name
));
44 prom_getprop(pnode_t nodeid
, caddr_t name
, caddr_t value
)
46 return (promif_getprop(nodeid
, name
, value
));
50 prom_nextprop(pnode_t nodeid
, caddr_t previous
, caddr_t next
)
52 return (promif_nextprop(nodeid
, previous
, next
));
55 /* obsolete entries, not needed */
57 prom_decode_composite_string(void *buf
, size_t buflen
, char *prev
)
59 if ((buf
== 0) || (buflen
== 0) || ((int)buflen
== -1))
65 prev
+= strlen(prev
) + 1;
66 if (prev
>= ((char *)buf
+ buflen
))
73 prom_bounded_getprop(pnode_t nodeid
, caddr_t name
, caddr_t value
, int len
)