8960 libefi: import efichar.c for ucs2 support
[unleashed.git] / usr / src / man / man3picltree / ptree_create_and_add_prop.3picltree
blob0df05d880e3e71594311d3b67af2a55c8757cef3
1 '\" te
2 .\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PTREE_CREATE_AND_ADD_PROP 3PICLTREE "Aug 1, 2000"
7 .SH NAME
8 ptree_create_and_add_prop \- create and add property to node and return
9 property handle
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lpicltree\fR [ \fIlibrary\fR... ]
14 #include <picltree.h>
16 \fBint\fR \fBptree_create_and_add_prop\fR(\fBpicl_nodehdl_t\fR \fInodeh\fR,
17      \fBptree_propinfo_t *\fR\fIinfop\fR, \fBvoid *\fR\fIvbuf\fR, \fBpicl_prophdl_t *\fR\fIproph\fR);
18 .fi
20 .SH DESCRIPTION
21 .sp
22 .LP
23 The \fBptree_create_and_add_prop()\fR function creates a property using the
24 property information specified in \fIinfop\fR and the value buffer \fIvbuf\fR
25 and adds the property to the node specified by \fInodeh\fR. If \fIproph\fR is
26 not \fINULL\fR, the handle of the property added to the node is returned in
27 \fIproph\fR.
28 .SH RETURN VALUES
29 .sp
30 .LP
31 Upon successful completion, \fB0\fR is returned. On failure, a non-negative
32 integer is returned to indicate an error.
33 .sp
34 .LP
35 \fBPICL_STALEHANDLE\fR is returned if the handle is no longer valid. This
36 occurs if the PICL tree was refreshed or reinitialized.
37 .sp
38 .LP
39 \fBPICL_INVALIDHANDLE\fR is returned if the specified handle never existed.
40 .SH ERRORS
41 .sp
42 .ne 2
43 .na
44 \fB\fBPICL_NOTSUPPORTED\fR\fR
45 .ad
46 .RS 22n
47 Property version not supported
48 .RE
50 .sp
51 .ne 2
52 .na
53 \fB\fBPICL_VALUETOOBIG\fR\fR
54 .ad
55 .RS 22n
56 Value exceeds maximum size
57 .RE
59 .sp
60 .ne 2
61 .na
62 \fB\fBPICL_NOTPROP\fR\fR
63 .ad
64 .RS 22n
65 Not a property
66 .RE
68 .sp
69 .ne 2
70 .na
71 \fB\fBPICL_NOTTABLE\fR\fR
72 .ad
73 .RS 22n
74 Not a table
75 .RE
77 .sp
78 .ne 2
79 .na
80 \fB\fBPICL_PROPEXISTS\fR\fR
81 .ad
82 .RS 22n
83 Property already exists
84 .RE
86 .sp
87 .ne 2
88 .na
89 \fB\fBPICL_RESERVEDNAME\fR\fR
90 .ad
91 .RS 22n
92 Property name is reserved
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fB\fBPICL_INVREFERENCE\fR\fR
99 .ad
100 .RS 22n
101 Invalid reference property value
105 .ne 2
107 \fB\fBPICL_INVALIDHANDLE\fR\fR
109 .RS 22n
110 Invalid handle
114 .ne 2
116 \fB\fBPICL_STALEHANDLE\fR\fR
118 .RS 22n
119 Stale handle
123 .ne 2
125 \fB\fBPICL_FAILURE\fR\fR
127 .RS 22n
128 General system failure
131 .SH ATTRIBUTES
134 See \fBattributes\fR(5) for descriptions of the following attributes:
139 box;
140 c | c
141 l | l .
142 ATTRIBUTE TYPE  ATTRIBUTE VALUE
144 Interface Stability     Evolving
146 MT-Level        MT-Safe
149 .SH SEE ALSO
152 \fBptree_create_prop\fR(3PICLTREE), \fBptree_add_prop\fR(3PICLTREE),
153 \fBattributes\fR(5)