1ldi_ident_from_dev(9F)   Kernel Functions for Drivers   ldi_ident_from_dev(9F)
2
3
4

NAME

6       ldi_ident_from_dev,      ldi_ident_from_stream,     ldi_ident_from_dip,
7       ldi_ident_release - ldi cookie management
8

SYNOPSIS

10       #include <sys/sunldi.h>
11
12       int ldi_ident_from_dip(dev_info_t *dip, ldi_ident_t *lip);
13
14
15       int ldi_ident_from_dev(dev_t dev, ldi_ident_t *lip);
16
17
18       int ldi_ident_from_stream(struct queue *sq, ldi_ident_t *lip);
19
20
21       void ldi_ident_release(ldi_ident_t li);
22
23

PARAMETERS

25       li     ldi identifier
26
27
28       lip    ldi identifier pointer
29
30
31       dip    pointer to device info node
32
33
34       dev    device number
35
36
37       sq     pointer to a stream queue
38
39

DESCRIPTION

41       The ldi_ident_from_dev() function allocates and  returns an ldi identi‐
42       fier  that  is  associated with the device number specified by dev. The
43       new ldi identifier is returned in the ldi identifier pointer  parameter
44       lip.
45
46
47       The ldi_ident_from_dip() function allocates and  returns an ldi identi‐
48       fier that is associated with the device info node pointed  to  by  dip.
49       The  new  ldi  identifier  is   returned  in the ldi identifier pointer
50       parameter lip.
51
52
53       The ldi_ident_from_stream() function allocates and returns an ldi iden‐
54       tifier  that is associated with the stream pointed to by queue. The new
55       ldi identifier is returned in the ldi identifier pointer parameter lip.
56
57
58       The ldi_ident_release() function releases an identifier that was  allo‐
59       cated by one of the ldi_ident_from_*() functions.
60

RETURN VALUES

62       The        ldi_ident_from_dev(),        ldi_ident_from_dip(),       and
63       ldi_ident_from_stream() functions return 0 upon success.
64
65
66       All of these functions return EINVAL for invalid input parameters.
67

CONTEXT

69       These functions can be called from user or kernel context.
70
71
72
73SunOS 5.11                        26 Mar 2009           ldi_ident_from_dev(9F)
Impressum