Print this page
10532 Convert sesio(7I) to mandoc
   1 SESIO(7I)                       Ioctl Requests                       SESIO(7I)
   2 
   3 
   4 
   5 NAME
   6        sesio - enclosure services device driver interface
   7 
   8 SYNOPSIS
   9        #include <sys/sesio.h>
  10 
  11 
  12 DESCRIPTION
  13        The  ses device driver provides the following ioctls as a means to
  14        access SCSI enclosure services devices.
  15 
  16 IOCTLS
  17        The  ses driver supports the following ioctls:
  18 
  19        SES_IOCTL_GETSTATE
  20                              This ioctl obtains enclosure state in the
  21                              ses_ioctl structure.
  22 



  23 
  24        SES_IOCTL_SETSTATE
  25                              This ioctl is used to set parameters on the
  26                              enclosure services device. The ses_ioctl
  27                              structure is used to pass information into the
  28                              driver.
  29 
  30 
  31 ERRORS
  32        EIO
  33                  The ses driver was unable to obtain data from the enclosure
  34                  services device or the  data transfer could not be completed.
  35 
  36 
  37        ENOTTY
  38                  The  ses driver does not support the requested ioctl
  39                  function.
  40 
  41 
  42        ENXIO
  43                  The enclosure services device does not exist.
  44 
  45 
  46        EFAULT
  47                  The user specified a bad data length.
  48 
  49 
  50 STRUCTURES
  51        The  ses_ioctl structure has the following fields:
  52 
  53          uint32_t;               /* Size of buffer that follows */
  54          uint8_t page_code:      /* Page to be read/written */
  55          uint8_t reserved[3];    /* Reserved; Set to 0 */
  56          unit8t  buffer[1];      /* Size arbitrary, user specifies */
  57 
  58 
  59 EXAMPLES
  60        Example 1 Using the  SES_IOCTL_GETSTATE ioctl
  61 
  62 
  63        The following example uses the  SES_IOCTL_GETSTATE ioctl to recover 20
  64        bytes of page 4 from a previously opened device.
  65 
  66 
  67          char   abuf[30];
  68          struct ses_ioctl *sesp;
  69          int    status;

  70          sesp = (ses_ioctl *)abuf;
  71          sesp->size = 20;
  72          sesp->page_code = 4;
  73          status = ioctl(fd, SES_IOCTL_GETSTATE, abuf);
  74 



  75 
  76 ATTRIBUTES
  77        See  attributes(5) for descriptions of the following attributes:
  78 

  79 

  80 


  81 
  82        +---------------+-----------------+
  83        |ATTRIBUTE TYPE | ATTRIBUTE VALUE |
  84        +---------------+-----------------+
  85        |Architecture   | SPARC           |
  86        +---------------+-----------------+
  87 



  88 SEE ALSO
  89        ses(7D), ioctl(9E)
  90 
  91 
  92 
  93                                 March 27, 1997                       SESIO(7I)
   1 SESIO(7I)                       Ioctl Requests                       SESIO(7I)
   2 


   3 NAME
   4      sesio - enclosure services device driver interface
   5 
   6 SYNOPSIS
   7      #include <sys/scsi/targets/sesio.h>
   8 

   9 DESCRIPTION
  10      The ses device driver provides the following ioctls as a means to access
  11      SCSI enclosure services devices.
  12 
  13 IOCTLS
  14      The ses driver supports the following ioctls:
  15 
  16      SES_IOCTL_GETSTATE  This ioctl obtains enclosure state in the ses_ioctl
  17                          structure.

  18 
  19      SES_IOCTL_SETSTATE  This ioctl is used to set parameters on the enclosure
  20                          services device.  The ses_ioctl structure is used to
  21                          pass information into the driver.
  22 



































  23 EXAMPLES
  24      Example 1  Using the SES_IOCTL_GETSTATE ioctl
  25 

  26      The following example uses the SES_IOCTL_GETSTATE ioctl to recover 20
  27      bytes of page 4 from a previously opened device.
  28 

  29        char   abuf[30];
  30        struct ses_ioctl *sesp;
  31        int    status;
  32 
  33        sesp = (ses_ioctl *)abuf;
  34        sesp->size = 20;
  35        sesp->page_code = 4;
  36        status = ioctl(fd, SES_IOCTL_GETSTATE, abuf);
  37 
  38 ERRORS
  39      EIO     The ses driver was unable to obtain data from the enclosure
  40              services device or the  data transfer could not be completed.
  41 
  42      ENOTTY  The ses driver does not support the requested ioctl function.

  43 
  44      ENXIO   The enclosure services device does not exist.
  45 
  46      EFAULT  The user specified a bad data length.
  47 
  48 STRUCTURES
  49      The ses_ioctl structure has the following fields:
  50 
  51        uint32_t page_size;      /* Size of buffer that follows */
  52        uint8_t  page_code:      /* Page to be read/written */
  53        uint8_t  reserved[3];    /* Reserved; Set to 0 */


  54 
  55 ARCHITECTURE
  56      SPARC
  57 
  58 SEE ALSO
  59      ses(7D), ioctl(9E)
  60 
  61 illumos                        October 23, 2017                        illumos