Print this page
10520 Convert hdio(7I) to mandoc
   1 '\" te
   2 .\" Copyright (c) 2002, Sun Microsystems, Inc.
   3 .\" 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.
   4 .\" 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.
   5 .\" 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]
   6 .TH HDIO 7I "Aug 13, 2002"
   7 .SH NAME
   8 hdio \- SMD and IPI disk control operations
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <sys/hdio.h>
  13 .fi
  14 
  15 .SH DESCRIPTION
  16 .LP
  17 Note -
  18 .sp
  19 .RS 2
  20 The SMC and IPI drivers have been discontinued. \fBdkio\fR(7I) is now the
  21 preferred method for retrieving disk information.
  22 .RE
  23 .sp
  24 .LP






  25 The SMD and IPI disk drivers supplied with this release support a set of
  26 \fBioctl\fR(2) requests for diagnostics and bad sector information. Basic to
  27 these  \fBioctl()\fR requests are the definitions in <\fBsys/hdio.h\fR>.
  28 .SH IOCTLS
  29 .sp
  30 .ne 2
  31 .na
  32 \fB\fBHDKIOCGTYPE\fR\fR
  33 .ad
  34 .RS 15n
  35 The argument is a pointer to a \fBhdk_type\fR structure (described below).
  36 This \fBioctl()\fR gets specific information from the hard disk.
  37 .RE
  38 
  39 .sp
  40 .ne 2
  41 .na
  42 \fB\fBHDKIOCSTYPE\fR\fR
  43 .ad
  44 .RS 15n
  45 The argument is a pointer to a \fBhdk_type\fR structure (described below).
  46 This \fBioctl()\fR sets specific information about the hard disk.
  47 .RE
  48 
  49 .sp
  50 .in +2
  51 .nf
  52 /*
  53  * Used for drive info
  54  */
  55 struct hdk_type {
  56  ushort_t  hdkt_hsect;    /* hard sector count (read only) */
  57  ushort_t  hdkt_promrev;  /* prom revision (read only) */
  58  uchar_t   hdkt_drtype;   /* drive type (ctlr specific) */
  59  uchar_t   hdkt_drstat;   /* drive status (ctlr specific, ro) */
  60 };
  61 .fi
  62 .in -2
  63 
  64 .sp
  65 .ne 2
  66 .na
  67 \fB\fBHDKIOCGBAD\fR\fR
  68 .ad
  69 .RS 14n
  70 The argument is a pointer to a \fBhdk_badmap\fR structure (described below).
  71 This \fBioctl()\fR is used to get the bad sector map from the disk.
  72 .RE
  73 
  74 .sp
  75 .ne 2
  76 .na
  77 \fB\fBHDKIOCSBAD\fR\fR
  78 .ad
  79 .RS 14n
  80 The argument is a pointer to a \fBhdk_badmap\fR structure (described below).
  81 This \fBioctl()\fR is used to set the bad sector map on the disk.
  82 .RE
  83 
  84 .sp
  85 .in +2
  86 .nf
  87 /*
  88  * Used for bad sector map
  89  */
  90 struct hdk_badmap {
  91         caddr_t hdkb_bufaddr;   /* address of user's map buffer */
  92 };
  93 .fi
  94 .in -2
  95 
  96 .sp
  97 .ne 2
  98 .na
  99 \fB\fBHDKIOCGDIAG\fR\fR
 100 .ad
 101 .RS 15n
 102 The argument is a pointer to a \fBhdk_diag\fR structure (described below).
 103 This \fBioctl()\fR gets the most recent command that failed along with the
 104 sector and error number from the hard disk.
 105 .RE
 106 
 107 .sp
 108 .in +2
 109 .nf
 110 /*
 111  * Used for disk diagnostics
 112  */
 113 struct hdk_diag {
 114  ushort_t       hdkd_errcmd;  /* most recent command in error */
 115  daddr_t        hdkd_errsect; /* most recent sector in error */
 116  uchar_t        hdkd_errno;   /* most recent error number */
 117  uchar_t        hdkd_severe;  /* severity of most recent error */
 118 };
 119 .fi
 120 .in -2
 121 
 122 .SH SEE ALSO
 123 .sp
 124 .LP
 125 \fBioctl\fR(2), \fBdkio\fR(7I)

   1 .\" Copyright (c) 2002, Sun Microsystems, Inc.
   2 .\" Copyright (c) 2017, Joyent, Inc.
   3 .\" The contents of this file are subject to the terms of the
   4 .\" Common Development and Distribution License (the "License").
   5 .\" You may not use this file except in compliance with the License.
   6 .\"
   7 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   8 .\" or http://www.opensolaris.org/os/licensing.
   9 .\" See the License for the specific language governing permissions
  10 .\" and limitations under the License.
  11 .\"
  12 .\" When distributing Covered Code, include this CDDL HEADER in each
  13 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  14 .\" If applicable, add the following below this CDDL HEADER, with the
  15 .\" fields enclosed by brackets "[]" replaced with your own identifying
  16 .\" information: Portions Copyright [yyyy] [name of copyright owner]
  17 .Dd October 23, 2017
  18 .Dt HDIO 7I
  19 .Os
  20 .Sh NAME
  21 .Nm hdio
  22 .Nd SMD and IPI disk control operations
  23 .Sh SYNOPSIS
  24 .In sys/hdio.h
  25 .Sh DESCRIPTION
  26 Note \(em the SMC and IPI drivers have been discontinued.
  27 .Xr dkio 7I
  28 is now the preferred method for retrieving disk information.
  29 .Pp
  30 The SMD and IPI disk drivers supplied with this release support a set of
  31 .Xr ioctl 2
  32 requests for diagnostics and bad sector information.
  33 Basic to these
  34 .Xr ioctl 2
  35 requests are the definitions in
  36 .In sys/hdio.h .
  37 .Sh IOCTLS
  38 .Bl -tag -width HDKIOCGTYPE
  39 .It Dv HDKIOCGTYPE
  40 The argument is a pointer to a
  41 .Vt hdk_type
  42 structure (described below).
  43 This
  44 .Xr ioctl 2
  45 gets specific information from the hard disk.
  46 .It Dv HDKIOCSTYPE
  47 The argument is a pointer to a
  48 .Vt hdk_type
  49 structure (described below).
  50 This
  51 .Xr ioctl 2
  52 sets specific information about the hard disk.
  53 .El
  54 .Bd -literal -offset 2n


  55 /*
  56  * Used for drive info
  57  */
  58 struct hdk_type {
  59         ushort_t  hdkt_hsect;    /* hard sector count (read only) */
  60         ushort_t  hdkt_promrev;  /* prom revision (read only) */
  61         uchar_t   hdkt_drtype;   /* drive type (ctlr specific) */
  62         uchar_t   hdkt_drstat;   /* drive status (ctlr specific, ro) */
  63 };
  64 .Ed
  65 .Bl -tag -width HDKIOCGBAD
  66 .It Dv HDKIOCGBAD
  67 The argument is a pointer to a
  68 .Vt hdk_badmap
  69 structure (described below).
  70 This
  71 .Xr ioctl 2
  72 is used to get the bad sector map from the disk.
  73 .It Dv HDKIOCSBAD
  74 The argument is a pointer to a
  75 .Vt hdk_badmap
  76 structure (described below).
  77 This
  78 .Xr ioctl 2
  79 is used to set the bad sector map on the disk.
  80 .El
  81 .Bd -literal -offset 2n








  82 /*
  83  * Used for bad sector map
  84  */
  85 struct hdk_badmap {
  86         caddr_t hdkb_bufaddr;   /* address of user's map buffer */
  87 };
  88 .Ed
  89 .Bl -tag -width HDKIOCGDIAG
  90 .It Dv HDKIOCGDIAG
  91 The argument is a pointer to a
  92 .Vt hdk_diag
  93 structure (described below).
  94 This
  95 .Xr ioctl 2
  96 gets the most recent command that failed along with the


  97 sector and error number from the hard disk.
  98 .El
  99 .Bd -literal -offset 2n



 100 /*
 101  * Used for disk diagnostics
 102  */
 103 struct hdk_diag {
 104         ushort_t hdkd_errcmd; /* most recent command in error */
 105         daddr_t hdkd_errsect; /* most recent sector in error */
 106         uchar_t hdkd_errno;   /* most recent error number */
 107         uchar_t hdkd_severe;  /* severity of most recent error */
 108 };
 109 .Ed
 110 .Sh SEE ALSO
 111 .Xr ioctl 2 ,
 112 .Xr dkio 7I