1di_prom_init(3DEVINFO)Device Information Library Functionsdi_prom_init(3DEVINFO)
2
3
4
6 di_prom_init, di_prom_fini - create and destroy a handle to the PROM
7 device information
8
10 cc [ flag... ] file... -ldevinfo [ library... ]
11 #include <libdevinfo.h>
12
13 di_prom_handle_t di_prom_init(void);
14
15
16 void di_prom_fini(di_prom_handle_t ph);
17
18
20 ph Handle to prom returned by di_prom_init().
21
22
24 For device nodes whose nodeid value is DI_PROM_NODEID (see
25 di_nodeid(3DEVINFO)), additional properties can be retrieved from the
26 PROM. The di_prom_init() function returns a handle that is used to
27 retrieve such properties. This handle is passed to
28 di_prom_prop_lookup_bytes(3DEVINFO) and di_prom_prop_next(3DEVINFO).
29
30
31 The di_prom_fini() function destroys the handle and all handles to the
32 PROM device information obtained from that handle.
33
35 Upon successful completion, di_prom_init() returns a handle. Otherwise,
36 DI_PROM_HANDLE_NIL is returned and errno is set to indicate the error.
37
39 The di_prom_init() sets errno function to any error code that can also
40 be set by openprom(7D) or malloc(3C).
41
43 See attributes(5) for descriptions of the following attributes:
44
45
46
47
48 ┌─────────────────────────────┬─────────────────────────────┐
49 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
50 ├─────────────────────────────┼─────────────────────────────┤
51 │Interface Stability │Evolving │
52 ├─────────────────────────────┼─────────────────────────────┤
53 │MT-Level │Safe │
54 └─────────────────────────────┴─────────────────────────────┘
55
57 di_nodeid(3DEVINFO), di_prom_prop_next(3DEVINFO),
58 di_prom_prop_lookup_bytes(3DEVINFO), libdevinfo(3LIB), malloc(3C),
59 attributes(5), openprom(7D)
60
61
62
63SunOS 5.11 1 Dec 1998 di_prom_init(3DEVINFO)