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