1di_path_prop_bytes(3DEDVeIvNiFcOe)Information Library Fundcit_ipoantsh_prop_bytes(3DEVINFO)
2
3
4

NAME

6       di_path_prop_bytes,       di_path_prop_ints,       di_path_prop_int64s,
7       di_path_prop_name,  di_path_prop_strings,  di_path_prop_type  -  access
8       path property information
9

SYNOPSIS

11       cc [ flag... ] file... -ldevinfo [ library... ]
12       #include <libdevinfo.h>
13
14       char *di_path_prop_bytes(di_path_prop_t prop);
15
16
17       int (di_path_prop_t prop);
18
19
20       int (di_path_prop_t prop, uchar_t **prop_data);
21
22
23       int (di_path_prop_t prop, int **prop_data);
24
25
26       int (di_path_prop_t prop, int64_t **prop_data);
27
28
29       int di_path_prop_type(di_path_prop_t prop, char **prop_data);
30
31

PARAMETERS

33       prop         A handle to a property returned by di_path_prop_next(3DEV‐
34                    INFO).
35
36
37       prop_data    For di_path_prop_bytes(), the address of a pointer  to  an
38                    unsigned character.
39
40                    For  di_path_prop_ints(),  the  address of a pointer to an
41                    integer.
42
43                    For di_path_prop_int64(), the address of a  pointer  to  a
44                    64-bit integer.
45
46                    For  di_path_prop_strings(),  the  address of pointer to a
47                    character.
48
49

DESCRIPTION

51       These functions access information associated with path property values
52       and attributes such as the property name or data type.
53
54
55       The di_path_prop_name() function returns a pointer to a string contain‐
56       ing the name of the property.
57
58
59       The di_path_prop_type() function returns the type of the path property.
60       The  type  determines the appropriate interface to access property val‐
61       ues. Possible property types are the  same  as  for  di_prop_type(3DEV‐
62       INFO),  excluding  DI_PROP_TYPE_UNKNOWN  and  DI_PROP_UNDEFINED.  Thus,
63       di_path_prop_type() can return one of the following constants:
64
65       DI_PROP_TYPE_INT       Use di_path_prop_ints() to access property data.
66
67
68       DI_PROP_TYPE_INT64     Use  di_path_prop_int64s()  to  access  property
69                              data.
70
71
72       DI_PROP_TYPE_STRING    Use  di_path_prop_strings()  to  access property
73                              data.
74
75
76       DI_PROP_TYPE_BYTE      Use  di_path_prop_bytes()  to  access   property
77                              data.
78
79
80
81       The di_path_prop_bytes() function returns the property data as a series
82       of unsigned characters.
83
84
85       The di_path_prop_ints() function returns the property data as a  series
86       of integers.
87
88
89       The  di_path_prop_int64s()  function  returns  the  property  data as a
90       series of integers.
91
92
93       The di_path_prop_strings() function returns the property data as a con‐
94       catenation of null-terminated strings.
95

RETURN VALUES

97       Upon successful completion,  di_path_prop_bytes(), di_path_prop_ints(),
98       di_path_prop_int64s(), and di_path_prop_strings() return a non-negative
99       value,  indicating  the number of entries in the property value buffer.
100       If the property is  found,  the  number  of  entries  in  prop_data  is
101       returned.  Otherwise,  -1  is returned and errno is set to indicate the
102       error.
103
104
105       For di_path_prop_bytes(), the  number  of  entries  is  the  number  of
106       unsigned characters contained in the buffer pointed to by prop_data.
107
108
109       For  di_path_prop_ints(),  the number of entries is the number of inte‐
110       gers contained in the buffer pointed to by prop_data.
111
112
113       For di_path_prop_ints(), the number of entries is the number of  64-bit
114       integers contained in the buffer pointed to by prop_data.
115
116
117       For  di_path_prop_strings(),  the  number  of  entries is the number of
118       null-terminated strings contained in the buffer. The strings are stored
119       in a concatenated format in the buffer.
120
121
122       The di_path_prop_name() function returns the name of the property.
123
124
125       The  di_path_prop_type()  function can return one of types described in
126       the Description.
127

ERRORS

129       These functions will fail if:
130
131       EINVAL     One of the arguments is invalid. For example,  the  property
132                  type does not match the interface.
133
134
135       ENOTSUP    The snapshot contains no property information.
136
137
138       ENXIO      The path property does not exist.
139
140

ATTRIBUTES

142       See attributes(5)  for descriptions of the following attributes:
143
144
145
146
147       ┌─────────────────────────────┬─────────────────────────────┐
148       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
149       ├─────────────────────────────┼─────────────────────────────┤
150       │Interface Stability          │Committed                    │
151       ├─────────────────────────────┼─────────────────────────────┤
152       │MT-Level                     │Safe                         │
153       └─────────────────────────────┴─────────────────────────────┘
154

SEE ALSO

156       di_path_prop_next(3DEVINFO),  di_prop_type(3DEVINFO), libdevinfo(3LIB),
157       attributes(5)
158
159
160       Writing Device Drivers
161
162
163
164SunOS 5.11                        15 May 2008     di_path_prop_bytes(3DEVINFO)
Impressum