1sesio(7I) Ioctl Requests sesio(7I)
2
3
4
6 sesio - enclosure services device driver interface
7
9 #include <sys/sesio.h>
10
11
13 The ses device driver provides the following ioctls as a means to
14 access SCSI enclosure services devices.
15
17 The ses driver supports the following ioctls:
18
19 SES_IOCTL_GETSTATE This ioctl obtains enclosure state in the
20 ses_ioctl structure.
21
22
23 SES_IOCTL_SETSTATE This ioctl is used to set parameters on the
24 enclosure services device. The ses_ioctl struc‐
25 ture is used to pass information into the driver.
26
27
29 EIO The ses driver was unable to obtain data from the enclosure
30 services device or the data transfer could not be completed.
31
32
33 ENOTTY The ses driver does not support the requested ioctl func‐
34 tion.
35
36
37 ENXIO The enclosure services device does not exist.
38
39
40 EFAULT The user specified a bad data length.
41
42
44 The ses_ioctl structure has the following fields:
45
46 uint32_t; /* Size of buffer that follows */
47 uint8_t page_code: /* Page to be read/written */
48 uint8_t reserved[3]; /* Reserved; Set to 0 */
49 unit8t buffer[1]; /* Size arbitrary, user specifies */
50
51
53 Example 1 Using the SES_IOCTL_GETSTATE ioctl
54
55
56 The following example uses the SES_IOCTL_GETSTATE ioctl to recover 20
57 bytes of page 4 from a previously opened device.
58
59
60 char abuf[30];
61 struct ses_ioctl *sesp;
62 int status;
63 sesp = (ses_ioctl *)abuf;
64 sesp->size = 20;
65 sesp->page_code = 4;
66 status = ioctl(fd, SES_IOCTL_GETSTATE, abuf);
67
68
70 See attributes(5) for descriptions of the following attributes:
71
72
73
74
75 ┌─────────────────────────────┬─────────────────────────────┐
76 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
77 ├─────────────────────────────┼─────────────────────────────┤
78 │Architecture │SPARC │
79 └─────────────────────────────┴─────────────────────────────┘
80
82 ses(7D), ioctl(9E)
83
84
85
86SunOS 5.11 27 Mar 1997 sesio(7I)