rename the top-level Makefile.cfgparam to cfgparam.mk
[unleashed.git] / share / man / man7i / hdio.7i
blob5fb6f841db963c24d6ccea18e199934e2b2732b8
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
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
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
49 .sp
50 .in +2
51 .nf
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) */
61 .fi
62 .in -2
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
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
84 .sp
85 .in +2
86 .nf
88  * Used for bad sector map
89  */
90 struct hdk_badmap {
91         caddr_t hdkb_bufaddr;   /* address of user's map buffer */
93 .fi
94 .in -2
96 .sp
97 .ne 2
98 .na
99 \fB\fBHDKIOCGDIAG\fR\fR
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.
108 .in +2
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 */
120 .in -2
122 .SH SEE ALSO
125 \fBioctl\fR(2), \fBdkio\fR(7I)