'\" te .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved. .\" 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. .\" 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. .\" 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] .TH NVLIST_REMOVE 3NVPAIR "Feb 2, 2004" .SH NAME nvlist_remove, nvlist_remove_all \- remove name-value pairs .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lnvpair\fR [ \fIlibrary\fR... ] #include \fBint\fR \fBnvlist_remove\fR(\fBnvlist_t *\fR\fInvl\fR, \fBconst char *\fR\fIname\fR, \fBdata_type_t\fR \fItype\fR); .fi .LP .nf \fBint\fR \fBnvlist_remove_all\fR(\fBnvlist_t *\fR\fInvl\fR, \fBconst char *\fR\fIname\fR); .fi .SH PARAMETERS .sp .ne 2 .na \fB\fInvl\fR\fR .ad .RS 8n The \fBnvlist_t\fR to be processed. .RE .sp .ne 2 .na \fB\fIname\fR\fR .ad .RS 8n Name of the name-value pair to be removed. .RE .sp .ne 2 .na \fB\fItype\fR\fR .ad .RS 8n Data type of the \fBnvpair\fR to be removed. .RE .SH DESCRIPTION .sp .LP The \fBnvlist_remove()\fR function removes the first occurrence of \fBnvpair\fR that matches the name and the type. .sp .LP The \fBnvlist_remove_all()\fR function removes all occurrences of \fBnvpair\fR that match the name, regardless of type. .sp .LP Multiple threads can simultaneously read the same \fBnvlist_t\fR but only one thread can actively change a given \fBnvlist_t\fR at a time. The caller is responsible for the synchronization. .SH RETURN VALUES .sp .LP These functions return 0 on success and an error value on failure. .SH ERRORS .sp .LP These functions will fail if: .sp .ne 2 .na \fB\fBEINVAL\fR\fR .ad .RS 10n There is an invalid argument. .RE .sp .ne 2 .na \fB\fBENOENT\fR\fR .ad .RS 10n No name-value pairs were found to match the criteria specified by \fIname\fR and \fItype\fR. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Evolving _ MT-Level MT-Safe .TE .SH SEE ALSO .sp .LP .BR libnvpair (3LIB), .BR attributes (7)