1nvlist_lookup_nvpair(3NVNPaAmIeR-)value Pair Library Funncvtliiosnts_lookup_nvpair(3NVPAIR)
2
3
4
6 nvlist_lookup_nvpair, nvlist_exists - lookup named pairs
7
9 cc [ flag... ] file... -lnvpair [ library... ]
10 #include <libnvpair.h>
11
12 int nvlist_lookup_nvpair(nvlist_t *nvl, const char *name,
13 nvpair_t **nvp);
14
15
16 boolean_t nvlist_exists(nvlist_t *nvl, const char *name);
17
18
20 The nvlist_lookup_nvpair() function returns the nvpair with the match‐
21 ing name, regardless of type. It is valid only for lists allocated with
22 NV_UNIQUE_NAME. See nvlist_alloc(3NVPAIR).
23
24
25 The nvlist_exists() function returns success if any nvpair exists with
26 the given name. It is valid for all types of lists.
27
29 The nvlist_lookup_nvpair() function returns 0 on success and an error
30 value on failure.
31
32
33 The nvlist_exists() function returns B_TRUE if an nvpair with the given
34 name exists and B_FALSE otherwise.
35
37 The nvlist_lookup_nvpair() function will fail if:
38
39 EINVAL There is an invalid argument.
40
41
42 ENOENT No matching name-value pair is found.
43
44
45 ENOTSUP The list was not allocated with NV_UNIQUE_NAME.
46
47
49 See attributes(5) for descriptions of the following attributes:
50
51
52
53
54 ┌─────────────────────────────┬─────────────────────────────┐
55 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
56 ├─────────────────────────────┼─────────────────────────────┤
57 │Interface Stability │Committed │
58 ├─────────────────────────────┼─────────────────────────────┤
59 │MT-Level │MT-Safe │
60 └─────────────────────────────┴─────────────────────────────┘
61
63 libnvpair(3LIB), nvlist_alloc(3NVPAIR), attributes(5),
64 nvlist_lookup_nvpair(9F)
65
66
67
68SunOS 5.11 24 Oct 2007 nvlist_lookup_nvpair(3NVPAIR)