1di_prop_lookup_bytes(3DDeEvViIcNeFOI)nformation Library Fduin_cptrioopn_slookup_bytes(3DEVINFO)
2
3
4

NAME

6       di_prop_lookup_bytes,     di_prop_lookup_ints,    di_prop_lookup_int64,
7       di_prop_lookup_strings - search for a property
8

SYNOPSIS

10       cc [ flag... ] file... -ldevinfo [ library... ]
11       #include <libdevinfo.h>
12
13       int di_prop_lookup_bytes(dev_t dev, di_node_t node,
14            const char *prop_name, uchar_t **prop_data);
15
16
17       int di_prop_lookup_ints(dev_t dev, di_node_t node,
18            const char *prop_name, int **prop_data);
19
20
21       int di_prop_lookup_int64(dev_t dev, di_node_t node,
22            const char *prop_name, int64_t **prop_data);
23
24
25       int di_prop_lookup_strings(dev_t dev, di_node_t node,
26            const char *prop_name, char **prop_data);
27
28

PARAMETERS

30       dev          dev_t of minor node with which the property is associated.
31                    DDI_DEV_T_ANY  is  a  wild  card that matches all dev_t's,
32                    including DDI_DEV_T_NONE.
33
34
35       node         Handle to the device node with which the property is asso‐
36                    ciated.
37
38
39       prop_data    For di_prop_lookup_bytes(), the address to a pointer to an
40                    array of unsigned characters containing the property data.
41
42                    For di_prop_lookup_ints(), the address to a pointer to  an
43                    array of integers containing the property data.
44
45                    For di_prop_lookup_int64(), the address to a pointer to an
46                    array of 64-bit integers containing the property data.
47
48                    For di_prop_lookup_strings(), the address to a pointer  to
49                    a  buffer  containing  a  concatenation of null-terminated
50                    strings containing the property data.
51
52
53       prop_name    Name of the property for which to search.
54
55

DESCRIPTION

57       These functions return the value of a  known  property  name  type  and
58       dev_t  value. All memory allocated by these functions is managed by the
59       library and must not be freed by the caller.
60

RETURN VALUES

62       If the property is  found,  the  number  of  entries  in  prop_data  is
63       returned.  If  the  property  is  a boolean type, 0 is returned and the
64       existence of this property indicates the value is true.  Otherwise,  -1
65       is returned and errno is set to indicate the error.
66

ERRORS

68       These functions will fail if:
69
70       EINVAL     Invalid argument.
71
72
73       ENOTSUP    The snapshot contains no property information.
74
75
76       ENXIO      The property does not exist; try di_prom_prop_lookup_*().
77
78

ATTRIBUTES

80       See attributes(5) for descriptions of the following attributes:
81
82
83
84
85       ┌─────────────────────────────┬─────────────────────────────┐
86       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
87       ├─────────────────────────────┼─────────────────────────────┤
88       │Interface Stability          │Evolving                     │
89       ├─────────────────────────────┼─────────────────────────────┤
90       │MT-Level                     │Safe                         │
91       └─────────────────────────────┴─────────────────────────────┘
92

SEE ALSO

94       di_init(3DEVINFO),     di_prom_prop_lookup_bytes(3DEVINFO),     libdev‐
95       info(3LIB), attributes(5)
96
97
98       Writing Device Drivers
99
100
101
102SunOS 5.11                        26 Mar 2001   di_prop_lookup_bytes(3DEVINFO)
Impressum