'\" 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 "2 Feb 2004" "SunOS 5.11" "Name-value Pair Library Functions" .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 .mk .na \fB\fInvl\fR\fR .ad .RS 8n .rt The \fBnvlist_t\fR to be processed. .RE .sp .ne 2 .mk .na \fB\fIname\fR\fR .ad .RS 8n .rt Name of the name-value pair to be removed. .RE .sp .ne 2 .mk .na \fB\fItype\fR\fR .ad .RS 8n .rt 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 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt There is an invalid argument. .RE .sp .ne 2 .mk .na \fB\fBENOENT\fR\fR .ad .RS 10n .rt 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(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.69i) |cw(2.81i) lw(2.69i) |lw(2.81i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityEvolving _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBlibnvpair\fR(3LIB), \fBattributes\fR(5)