Print this page
10520 Convert hdio(7I) to mandoc
   1 HDIO(7I)                        Ioctl Requests                        HDIO(7I)
   2 
   3 
   4 
   5 NAME
   6        hdio - SMD and IPI disk control operations
   7 
   8 SYNOPSIS
   9        #include <sys/hdio.h>
  10 
  11 
  12 DESCRIPTION
  13        Note -

  14 
  15          The SMC and IPI drivers have been discontinued. dkio(7I) is now the
  16          preferred method for retrieving disk information.

  17 
  18 
  19        The SMD and IPI disk drivers supplied with this release support a set
  20        of ioctl(2) requests for diagnostics and bad sector information. Basic
  21        to these  ioctl() requests are the definitions in <sys/hdio.h>.
  22 
  23 IOCTLS
  24        HDKIOCGTYPE
  25                       The argument is a pointer to a hdk_type structure
  26                       (described below).  This ioctl() gets specific
  27                       information from the hard disk.
  28 



  29 
  30        HDKIOCSTYPE
  31                       The argument is a pointer to a hdk_type structure
  32                       (described below).  This ioctl() sets specific
  33                       information about the hard disk.
  34 
  35 
  36          /*
  37           * Used for drive info
  38           */
  39          struct hdk_type {
  40           ushort_t  hdkt_hsect;    /* hard sector count (read only) */
  41           ushort_t  hdkt_promrev;  /* prom revision (read only) */
  42           uchar_t   hdkt_drtype;   /* drive type (ctlr specific) */
  43           uchar_t   hdkt_drstat;   /* drive status (ctlr specific, ro) */
  44          };
  45 
  46 
  47        HDKIOCGBAD
  48                      The argument is a pointer to a hdk_badmap structure
  49                      (described below).  This ioctl() is used to get the bad
  50                      sector map from the disk.
  51 
  52 
  53        HDKIOCSBAD
  54                      The argument is a pointer to a hdk_badmap structure
  55                      (described below).  This ioctl() is used to set the bad
  56                      sector map on the disk.
  57 
  58 
  59          /*
  60           * Used for bad sector map
  61           */
  62          struct hdk_badmap {
  63               caddr_t   hdkb_bufaddr;  /* address of user's map buffer */
  64          };
  65 




  66 
  67        HDKIOCGDIAG
  68                       The argument is a pointer to a hdk_diag structure
  69                       (described below).  This ioctl() gets the most recent
  70                       command that failed along with the sector and error
  71                       number from the hard disk.
  72 
  73 
  74          /*
  75           * Used for disk diagnostics
  76           */
  77          struct hdk_diag {
  78           ushort_t hdkd_errcmd;  /* most recent command in error */
  79           daddr_t  hdkd_errsect; /* most recent sector in error */
  80           uchar_t  hdkd_errno;   /* most recent error number */
  81           uchar_t  hdkd_severe;  /* severity of most recent error */
  82          };
  83 
  84 
  85 SEE ALSO
  86        ioctl(2), dkio(7I)
  87 
  88 
  89 
  90                                 August 13, 2002                       HDIO(7I)
   1 HDIO(7I)                        Ioctl Requests                        HDIO(7I)
   2 


   3 NAME
   4      hdio - SMD and IPI disk control operations
   5 
   6 SYNOPSIS
   7      #include <sys/hdio.h>
   8 

   9 DESCRIPTION
  10      Note -- the SMC and IPI drivers have been discontinued.  dkio(7I) is now
  11      the preferred method for retrieving disk information.
  12 
  13      The SMD and IPI disk drivers supplied with this release support a set of
  14      ioctl(2) requests for diagnostics and bad sector information.  Basic to
  15      these ioctl(2) requests are the definitions in <sys/hdio.h>.
  16 





  17 IOCTLS
  18      HDKIOCGTYPE  The argument is a pointer to a hdk_type structure (described
  19                   below).  This ioctl(2) gets specific information from the
  20                   hard disk.

  21 
  22      HDKIOCSTYPE  The argument is a pointer to a hdk_type structure (described
  23                   below).  This ioctl(2) sets specific information about the
  24                   hard disk.
  25 






  26        /*
  27         * Used for drive info
  28         */
  29        struct hdk_type {
  30                ushort_t  hdkt_hsect;    /* hard sector count (read only) */
  31                ushort_t  hdkt_promrev;  /* prom revision (read only) */
  32                uchar_t   hdkt_drtype;   /* drive type (ctlr specific) */
  33                uchar_t   hdkt_drstat;   /* drive status (ctlr specific, ro) */
  34        };
  35 
  36      HDKIOCGBAD  The argument is a pointer to a hdk_badmap structure
  37                  (described below).  This ioctl(2) is used to get the bad


  38                  sector map from the disk.
  39 
  40      HDKIOCSBAD  The argument is a pointer to a hdk_badmap structure
  41                  (described below).  This ioctl(2) is used to set the bad


  42                  sector map on the disk.
  43 

  44        /*
  45         * Used for bad sector map
  46         */
  47        struct hdk_badmap {
  48                caddr_t hdkb_bufaddr;   /* address of user's map buffer */
  49        };
  50 
  51      HDKIOCGDIAG  The argument is a pointer to a hdk_diag structure (described
  52                   below).  This ioctl(2) gets the most recent command that
  53                   failed along with the sector and error number from the hard
  54                   disk.
  55 







  56        /*
  57         * Used for disk diagnostics
  58         */
  59        struct hdk_diag {
  60                ushort_t hdkd_errcmd; /* most recent command in error */
  61                daddr_t hdkd_errsect; /* most recent sector in error */
  62                uchar_t hdkd_errno;   /* most recent error number */
  63                uchar_t hdkd_severe;  /* severity of most recent error */
  64        };
  65 

  66 SEE ALSO
  67      ioctl(2), dkio(7I)
  68 
  69 illumos                        October 23, 2017                        illumos