| Current File : //usr/share/man/man9f/nvlist_remove.9f |
'\" te
.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
.TH nvlist_remove 9F "16 Jan 2006" "SunOS 5.11" "Kernel Functions for Drivers"
.SH NAME
nvlist_remove, nvlist_remove_all \- remove name-value pairs
.SH SYNOPSIS
.LP
.nf
#include <sys/nvpair.h>
\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 INTERFACE LEVEL
.sp
.LP
Solaris DDI specific (Solaris DDI)
.SH PARAMETERS
.sp
.ne 2
.mk
.na
\fB\fInvl\fR\fR
.ad
.RS 8n
.rt
The list of name-value pairs (\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 (\fBnvpair\fR) 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 \fInvpair\fR that matches the name and the type.
.sp
.LP
The \fBnvlist_remove_all()\fR function removes all occurrences of \fInvpair\fR that match the name, regardless of type.
.sp
.LP
Multiple threads can simultaneously read the same \fBnvlist_t\fR but only one thread may 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 \fB0\fR on success and an error value on failure.
.SH CONTEXT
.sp
.LP
The \fBnvlist_remove()\fR and \fBnvlist_remove_all()\fR functions can be called from user, interrupt, or kernel context.
.SH ERRORS
.sp
.ne 2
.mk
.na
\fBEINVAL\fR
.ad
.RS 10n
.rt
There is an invalid argument.
.RE
.sp
.ne 2
.mk
.na
\fBENOENT\fR
.ad
.RS 10n
.rt
No name-value pairs were found to match the criteria specified by name and type.
.RE