6198 Let's EOL cachefs
[illumos-gate.git] / usr / src / man / man3picltree / ptree_create_node.3picltree
blobe043d8008470982f26b989dd8398e1eb1f4f19eb
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_NODE 3PICLTREE "Mar 28, 2000"
7 .SH NAME
8 ptree_create_node, ptree_destroy_node \- create or destroy a node
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lpicltree\fR [ \fIlibrary\fR... ]
13 #include <picltree.h>
15 \fBint\fR \fBptree_create_node\fR(\fBchar *\fR\fIname\fR, \fBchar *\fR\fIclname\fR,
16      \fBpicl_nodehdl_t *\fR\fInodeh\fR);
17 .fi
19 .LP
20 .nf
21 \fBint\fR \fBptree_destroy_node\fR(\fBpicl_nodehdl_t\fR \fInodeh\fR);
22 .fi
24 .SH DESCRIPTION
25 .sp
26 .LP
27 The \fBptree_create_node()\fR function creates a node and sets the "name"
28 property value to the string specified in \fIname\fR and the "class" property
29 value to the string specified in \fIclname\fR. The handle of the new node is
30 copied into the location given by \fInodeh\fR.
31 .sp
32 .LP
33 The \fBptree_destroy_node()\fR function destroys the node specified by
34 \fInodeh\fR and frees up any allocated space. The node to be destroyed must
35 have been previously deleted by ptree_delete_node (see
36 \fBptree_add_node\fR(3PICLTREE)). Otherwise, \fBPICL_CANTDESTROY\fR is
37 returned.
38 .SH RETURN VALUES
39 .sp
40 .LP
41 Upon successful completion, \fB0\fR is returned. On failure, a non-negative
42 integer is returned to indicate an error.
43 .sp
44 .LP
45 \fBPICL_STALEHANDLE\fR is returned if the handle is no longer valid. This
46 occurs if the PICL tree was refreshed or reinitialized.
47 .sp
48 .LP
49 \fBPICL_INVALIDHANDLE\fR is returned if the specified handle never existed.
50 .SH ERRORS
51 .sp
52 .ne 2
53 .na
54 \fB\fBPICL_INVALIDARG\fR\fR
55 .ad
56 .RS 22n
57 Invalid argument
58 .RE
60 .sp
61 .ne 2
62 .na
63 \fB\fBPICL_VALUETOOBIG\fR\fR
64 .ad
65 .RS 22n
66 Value exceeds maximum size
67 .RE
69 .sp
70 .ne 2
71 .na
72 \fB\fBPICL_NOTSUPPORTED\fR\fR
73 .ad
74 .RS 22n
75 Property version not supported
76 .RE
78 .sp
79 .ne 2
80 .na
81 \fB\fBPICL_CANTDESTROY\fR\fR
82 .ad
83 .RS 22n
84 Attempting to destroy before delete
85 .RE
87 .sp
88 .ne 2
89 .na
90 \fB\fBPICL_TREEBUSY\fR\fR
91 .ad
92 .RS 22n
93 PICL tree is busy
94 .RE
96 .sp
97 .ne 2
98 .na
99 \fB\fBPICL_NOTNODE\fR\fR
101 .RS 22n
102 Not a node
106 .ne 2
108 \fB\fBPICL_INVALIDHANDLE\fR\fR
110 .RS 22n
111 Invalid handle
115 .ne 2
117 \fB\fBPICL_STALEHANDLE\fR\fR
119 .RS 22n
120 Stale handle
124 .ne 2
126 \fB\fBPICL_FAILURE\fR\fR
128 .RS 22n
129 General system failure
132 .SH ATTRIBUTES
135 See \fBattributes\fR(5) for descriptions of the following attributes:
140 box;
141 c | c
142 l | l .
143 ATTRIBUTE TYPE  ATTRIBUTE VALUE
145 Interface Stability     Evolving
147 MT-Level        MT-Safe
150 .SH SEE ALSO
153 \fBptree_add_node\fR(3PICLTREE), \fBattributes\fR(5)