6198 Let's EOL cachefs
[illumos-gate.git] / usr / src / man / man3picltree / ptree_add_prop.3picltree
blob6e712f65e1903eff48f027a1ec63ef20e61440fd
1 '\" te
2 .\" Copyright (c) 2002, 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_ADD_PROP 3PICLTREE "Apr 25, 2002"
7 .SH NAME
8 ptree_add_prop, ptree_delete_prop \- add or delete a property
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_add_prop\fR(\fBpicl_nodehdl_t\fR \fInodeh\fR, \fBpicl_prophdl_t\fR \fIproph\fR);
16 .fi
18 .LP
19 .nf
20 \fBint\fR \fBptree_delete_prop\fR(\fBpicl_prophdl_t\fR \fIproph\fR);
21 .fi
23 .SH DESCRIPTION
24 .sp
25 .LP
26 The \fBptree_add_prop()\fR function adds the property specified by the handle
27 \fIproph\fR to the list of properties of the node specified by handle
28 \fInodeh\fR.
29 .sp
30 .LP
31 The \fBptree_delete_prop()\fR function deletes the property from the property
32 list of the node. For a table property, the entire table is deleted.
33 .SH RETURN VALUES
34 .sp
35 .LP
36 Upon successful completion, 0 is returned. On failure, a non-negative integer
37 is returned to indicate an error.
38 .sp
39 .LP
40 \fBPICL_STALEHANDLE\fR is returned if the handle is no longer valid. This
41 occurs if the PICL tree was refreshed or reinitialized.
42 .sp
43 .LP
44 \fBPICL_INVALIDHANDLE\fR is returned if the specified handle never existed.
45 .SH ERRORS
46 .sp
47 .ne 2
48 .na
49 \fB\fBPICL_NOTTABLE\fR\fR
50 .ad
51 .RS 22n
52 Not a table
53 .RE
55 .sp
56 .ne 2
57 .na
58 \fB\fBPICL_NOTPROP\fR\fR
59 .ad
60 .RS 22n
61 Not a property
62 .RE
64 .sp
65 .ne 2
66 .na
67 \fB\fBPICL_INVALIDHANDLE\fR\fR
68 .ad
69 .RS 22n
70 Invalid handle
71 .RE
73 .sp
74 .ne 2
75 .na
76 \fB\fBPICL_STALEHANDLE\fR\fR
77 .ad
78 .RS 22n
79 Stale handle
80 .RE
82 .sp
83 .ne 2
84 .na
85 \fB\fBPICL_PROPEXISTS\fR\fR
86 .ad
87 .RS 22n
88 Property already exists
89 .RE
91 .sp
92 .ne 2
93 .na
94 \fB\fBPICL_FAILURE\fR\fR
95 .ad
96 .RS 22n
97 General system failure
98 .RE
100 .SH ATTRIBUTES
103 See \fBattributes\fR(5) for descriptions of the following attributes:
108 box;
109 c | c
110 l | l .
111 ATTRIBUTE TYPE  ATTRIBUTE VALUE
113 Interface Stability     Evolving
115 MT-Level        MT-Safe
118 .SH SEE ALSO
121 \fBptree_create_prop\fR(3PICLTREE), \fBattributes\fR(5)