diff options
author | Richard Lowe <richlowe@richlowe.net> | 2022-02-26 16:40:47 -0600 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2022-03-10 01:14:35 -0600 |
commit | bbf215553c7233fbab8a0afdf1fac74c44781867 (patch) | |
tree | e698415c5d1265b368c58c56199244dc2be86500 /usr/src/man/man4i/sesio.4i | |
parent | 236cb9a89d936b4b681853751c9af1adccc35ef9 (diff) | |
download | illumos-joyent-bbf215553c7233fbab8a0afdf1fac74c44781867.tar.gz |
14443 resection manual pages per IPD4
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Andy Fiddaman <andy@omnios.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/man/man4i/sesio.4i')
-rw-r--r-- | usr/src/man/man4i/sesio.4i | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/usr/src/man/man4i/sesio.4i b/usr/src/man/man4i/sesio.4i new file mode 100644 index 0000000000..94d12dd64d --- /dev/null +++ b/usr/src/man/man4i/sesio.4i @@ -0,0 +1,95 @@ +.\" Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved +.\" Copyright (c) 2017, Joyent, Inc. +.\" The contents of this file are subject to the terms of the +.\" Common Development and Distribution License (the "License"). +.\" You may not use this file except in compliance with the License. +.\" +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +.\" or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions +.\" and limitations under the License. +.\" +.\" When distributing Covered Code, include this CDDL HEADER in each +.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. +.\" If applicable, add the following below this CDDL HEADER, with the +.\" fields enclosed by brackets "[]" replaced with your own identifying +.\" information: Portions Copyright [yyyy] [name of copyright owner] +.Dd October 23, 2017 +.Dt SESIO 4I +.Os +.Sh NAME +.Nm sesio +.Nd enclosure services device driver interface +.Sh SYNOPSIS +.In sys/scsi/targets/sesio.h +.Sh DESCRIPTION +The +.Nm ses +device driver provides the following ioctls as a means to access +SCSI enclosure services devices. +.Sh IOCTLS +The +.Nm ses +driver supports the following ioctls: +.Bl -tag -width SES_IOCTL_GETSTATE +.It Dv SES_IOCTL_GETSTATE +This ioctl obtains enclosure state in the +.Vt ses_ioctl +structure. +.It Dv SES_IOCTL_SETSTATE +This ioctl is used to set parameters on the enclosure services device. +The +.Vt ses_ioctl +structure is used to pass information into the driver. +.El +.Sh EXAMPLES +.Bl -tag -width "Example 1" +.It Sy "Example 1" +Using the +.Dv SES_IOCTL_GETSTATE +ioctl +.El +.Pp +The following example uses the +.Dv SES_IOCTL_GETSTATE +ioctl to recover 20 bytes of page 4 from a previously opened device. +.Bd -literal -offset 2n +char abuf[30]; +struct ses_ioctl *sesp; +int status; + +sesp = (ses_ioctl *)abuf; +sesp->size = 20; +sesp->page_code = 4; +status = ioctl(fd, SES_IOCTL_GETSTATE, abuf); +.Ed +.Sh ERRORS +.Bl -tag -width ENOTTY +.It Er EIO +The +.Nm ses +driver was unable to obtain data from the enclosure services +device or the data transfer could not be completed. +.It Er ENOTTY +The +.Nm ses +driver does not support the requested ioctl function. +.It Er ENXIO +The enclosure services device does not exist. +.It Er EFAULT +The user specified a bad data length. +.El +.Sh STRUCTURES +The +.Vt ses_ioctl +structure has the following fields: +.Bd -literal -offset 2n +uint32_t page_size; /* Size of buffer that follows */ +uint8_t page_code: /* Page to be read/written */ +uint8_t reserved[3]; /* Reserved; Set to 0 */ +.Ed +.Sh ARCHITECTURE +SPARC +.Sh SEE ALSO +.Xr ses 4D , +.Xr ioctl 9E |