1nvlist_remove(3NVPAIR) Name-value Pair Library Functionsnvlist_remove(3NVPAIR)
2
3
4
6 nvlist_remove, nvlist_remove_all - remove name-value pairs
7
9 cc [ flag... ] file... -lnvpair [ library... ]
10 #include <libnvpair.h>
11
12 int nvlist_remove(nvlist_t *nvl, const char *name,
13 data_type_t type);
14
15
16 int nvlist_remove_all(nvlist_t *nvl, const char *name);
17
18
20 nvl The nvlist_t to be processed.
21
22
23 name Name of the name-value pair to be removed.
24
25
26 type Data type of the nvpair to be removed.
27
28
30 The nvlist_remove() function removes the first occurrence of nvpair
31 that matches the name and the type.
32
33
34 The nvlist_remove_all() function removes all occurrences of nvpair that
35 match the name, regardless of type.
36
37
38 Multiple threads can simultaneously read the same nvlist_t but only one
39 thread can actively change a given nvlist_t at a time. The caller is
40 responsible for the synchronization.
41
43 These functions return 0 on success and an error value on failure.
44
46 These functions will fail if:
47
48 EINVAL There is an invalid argument.
49
50
51 ENOENT No name-value pairs were found to match the criteria speci‐
52 fied by name and type.
53
54
56 See attributes(5) for descriptions of the following attributes:
57
58
59
60
61 ┌────────────────────────────┬──────────────────────────────┐
62 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
63 ├────────────────────────────┼──────────────────────────────┤
64 │Interface Stability │ Evolving │
65 ├────────────────────────────┼──────────────────────────────┤
66 │MT-Level │ MT-Safe │
67 └────────────────────────────┴──────────────────────────────┘
68
70 libnvpair(3LIB), attributes(5)
71
72
73
74SunOS 5.11 2 Feb 2004 nvlist_remove(3NVPAIR)