Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / nvlist_remove.9f
blob0adac9f3ab6a73a8ebac09d4012d288dfddabb3f
1 '\" te
2 .\" Copyright (c) 2006, 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 NVLIST_REMOVE 9F "Jan 16, 2006"
7 .SH NAME
8 nvlist_remove, nvlist_remove_all \- remove name-value pairs
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/nvpair.h>
14 \fBint\fR \fBnvlist_remove\fR(\fBnvlist_t *\fR\fInvl\fR, \fBconst char *\fR\fIname\fR, \fBdata_type_t\fR \fItype\fR);
15 .fi
17 .LP
18 .nf
19 \fBint\fR  \fBnvlist_remove_all\fR(\fBnvlist_t *\fR\fInvl\fR, \fBconst char *\fR\fIname\fR);
20 .fi
22 .SH INTERFACE LEVEL
23 .sp
24 .LP
25 Solaris DDI specific (Solaris DDI)
26 .SH PARAMETERS
27 .sp
28 .ne 2
29 .na
30 \fB\fInvl\fR\fR
31 .ad
32 .RS 8n
33 The list of name-value pairs (\fBnvlist_t\fR) to be processed.
34 .RE
36 .sp
37 .ne 2
38 .na
39 \fB\fIname\fR\fR
40 .ad
41 .RS 8n
42 Name of the name-value pair (\fBnvpair\fR) to be removed.
43 .RE
45 .sp
46 .ne 2
47 .na
48 \fB\fItype\fR\fR
49 .ad
50 .RS 8n
51 Data type of the \fBnvpair\fR to be removed.
52 .RE
54 .SH DESCRIPTION
55 .sp
56 .LP
57 The \fBnvlist_remove()\fR function removes the first occurrence of \fInvpair\fR
58 that matches the name and the type.
59 .sp
60 .LP
61 The \fBnvlist_remove_all()\fR function removes all occurrences of \fInvpair\fR
62 that match the name, regardless of type.
63 .sp
64 .LP
65 Multiple threads can simultaneously read the same \fBnvlist_t\fR but only one
66 thread may actively change a given \fBnvlist_t\fR at a time. The caller is
67 responsible for the synchronization.
68 .SH RETURN VALUES
69 .sp
70 .LP
71 These functions return \fB0\fR on success and an error value on failure.
72 .SH CONTEXT
73 .sp
74 .LP
75 The \fBnvlist_remove()\fR and \fBnvlist_remove_all()\fR functions can be called
76 from user, interrupt, or kernel context.
77 .SH ERRORS
78 .sp
79 .ne 2
80 .na
81 \fBEINVAL\fR
82 .ad
83 .RS 10n
84 There is an invalid argument.
85 .RE
87 .sp
88 .ne 2
89 .na
90 \fBENOENT\fR
91 .ad
92 .RS 10n
93 No name-value pairs were found to match the criteria specified by name and
94 type.
95 .RE