1di_prom_prop_lookup_byDteevsi(c3eDEIVnIfNoFrOm)ation Librdair_yprFoumn_cptrioopn_slookup_bytes(3DEVINFO)
2
3
4

NAME

6       di_prom_prop_lookup_bytes,                    di_prom_prop_lookup_ints,
7       di_prom_prop_lookup_strings - search for a PROM property
8

SYNOPSIS

10       cc [ flag... ] file... -ldevinfo [ library... ]
11       #include <libdevinfo.h>
12
13       int di_prom_prop_lookup_bytes(di_prom_handle_t ph, di_node_t node,
14            const char *prop_name, uchar_t **prop_data);
15
16
17       int di_prom_prop_lookup_ints(di_prom_handle_t ph, di_node_t node,
18            const char *prop_name, int **prop_data);
19
20
21       int di_prom_prop_lookup_strings(di_prom_handle_t ph, di_node_t node,
22            const char *prop_name, char **prop_data);
23
24

PARAMETERS

26       node         Handle to device node in snapshot created by di_init(3DEV‐
27                    INFO).
28
29
30       ph           Handle returned by di_prom_init(3DEVINFO).
31
32
33       prop_data    For  di_prom_prop_lookup_bytes(), the address of a pointer
34                    to an array of unsigned characters.
35
36                    For di_prom_prop_lookup_ints(), the address of  a  pointer
37                    to an integer.
38
39                    For  di_prom_prop_lookup_strings(), the address of pointer
40                    to a buffer.
41
42
43       prop_name    The name of the property being searched.
44
45

DESCRIPTION

47       These functions return the value of a  known  PROM  property  name  and
48       value  type  and  update the prop_data pointer to reference memory that
49       contains the property value. All memory allocated by these functions is
50       managed by the library and must not be freed by the caller.
51

RETURN VALUES

53       If  the  property  is  found,  the  number  of  entries in prop_data is
54       returned. If the property is a boolean type,  0  is  returned  and  the
55       existence  of  this property indicates the value is true. Otherwise, -1
56       is returned and errno is set to indicate the error.
57
58
59       For di_prom_prop_lookup_bytes(), the number of entries is the number of
60       unsigned characters contained in the buffer pointed to by prop_data.
61
62
63       For  di_prom_prop_lookup_ints(), the number of entries is the number of
64       integers contained in the buffer pointed to by prop_data.
65
66
67       For di_prom_prop_lookup_strings(), the number of entries is the  number
68       of  null-terminated  strings  contained  in the buffer. The strings are
69       stored in a concatenated format in the buffer.
70

ERRORS

72       These functions will fail if::
73
74       EINVAL    Invalid argument.
75
76
77       ENXIO     The property does not exist.
78
79

ATTRIBUTES

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

SEE ALSO

95       di_init(3DEVINFO),    di_prom_prop_next(3DEVINFO),    libdevinfo(3LIB),
96       attributes(5), openprom(7D)
97
98
99       Writing Device Drivers
100
101
102
103SunOS 5.11                        1 Dec 1998di_prom_prop_lookup_bytes(3DEVINFO)
Impressum