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]
cc [ flag... ] file... -lnvpair [ library... ] #include <libnvpair.h> int nvlist_remove(nvlist_t *nvl, const char *name, data_type_t type);
int nvlist_remove_all(nvlist_t *nvl, const char *name);
The nvlist_t to be processed.
Name of the name-value pair to be removed.
Data type of the nvpair to be removed.
The nvlist_remove() function removes the first occurrence of nvpair that matches the name and the type.
The nvlist_remove_all() function removes all occurrences of nvpair that match the name, regardless of type.
Multiple threads can simultaneously read the same nvlist_t but only one thread can actively change a given nvlist_t at a time. The caller is responsible for the synchronization.
These functions return 0 on success and an error value on failure.
These functions will fail if: EINVAL
There is an invalid argument.
No name-value pairs were found to match the criteria specified by name and type.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Evolving |
MT-Level MT-Safe |
libnvpair(3LIB), attributes(5)