xref: /titanic_52/usr/src/uts/intel/promif/prom_prop.c (revision c2580b931007758eab8cb5ae8726ebe1588e259b)
1 /*
2  * CDDL HEADER START
3  *
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
7  * with the License.
8  *
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.
13  *
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]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 /*
30  * Stuff for mucking about with properties
31  */
32 
33 #include <sys/promif.h>
34 #include <sys/promimpl.h>
35 #include <sys/prom_emul.h>
36 
37 int
38 prom_getproplen(pnode_t nodeid, caddr_t name)
39 {
40 	return (promif_getproplen(nodeid, name));
41 }
42 
43 int
44 prom_getprop(pnode_t nodeid, caddr_t name, caddr_t value)
45 {
46 	return (promif_getprop(nodeid, name, value));
47 }
48 
49 caddr_t
50 prom_nextprop(pnode_t nodeid, caddr_t previous, caddr_t next)
51 {
52 	return (promif_nextprop(nodeid, previous, next));
53 }
54 
55 /* obsolete entries, not needed */
56 char *
57 prom_decode_composite_string(void *buf, size_t buflen, char *prev)
58 {
59 	if ((buf == 0) || (buflen == 0) || ((int)buflen == -1))
60 		return ((char *)0);
61 
62 	if (prev == 0)
63 		return ((char *)buf);
64 
65 	prev += strlen(prev) + 1;
66 	if (prev >= ((char *)buf + buflen))
67 		return ((char *)0);
68 	return (prev);
69 }
70 
71 /*ARGSUSED*/
72 int
73 prom_bounded_getprop(pnode_t nodeid, caddr_t name, caddr_t value, int len)
74 {
75 	return (-1);
76 }
77