1hdio(7I) Ioctl Requests hdio(7I)
2
3
4
6 hdio - SMD and IPI disk control operations
7
9 #include <sys/hdio.h>
10
11
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
24 HDKIOCGTYPE The argument is a pointer to a hdk_type structure
25 (described below). This ioctl() gets specific informa‐
26 tion from the hard disk.
27
28
29 HDKIOCSTYPE The argument is a pointer to a hdk_type structure
30 (described below). This ioctl() sets specific informa‐
31 tion about the hard disk.
32
33
34 /*
35 * Used for drive info
36 */
37 struct hdk_type {
38 ushort_t hdkt_hsect; /* hard sector count (read only) */
39 ushort_t hdkt_promrev; /* prom revision (read only) */
40 uchar_t hdkt_drtype; /* drive type (ctlr specific) */
41 uchar_t hdkt_drstat; /* drive status (ctlr specific, ro) */
42 };
43
44
45 HDKIOCGBAD The argument is a pointer to a hdk_badmap structure
46 (described below). This ioctl() is used to get the bad
47 sector map from the disk.
48
49
50 HDKIOCSBAD The argument is a pointer to a hdk_badmap structure
51 (described below). This ioctl() is used to set the bad
52 sector map on the disk.
53
54
55 /*
56 * Used for bad sector map
57 */
58 struct hdk_badmap {
59 caddr_t hdkb_bufaddr; /* address of user's map buffer */
60 };
61
62
63 HDKIOCGDIAG The argument is a pointer to a hdk_diag structure
64 (described below). This ioctl() gets the most recent
65 command that failed along with the sector and error num‐
66 ber from the hard disk.
67
68
69 /*
70 * Used for disk diagnostics
71 */
72 struct hdk_diag {
73 ushort_t hdkd_errcmd; /* most recent command in error */
74 daddr_t hdkd_errsect; /* most recent sector in error */
75 uchar_t hdkd_errno; /* most recent error number */
76 uchar_t hdkd_severe; /* severity of most recent error */
77 };
78
79
81 ioctl(2), dkio(7I)
82
83
84
85SunOS 5.11 13 Aug 2002 hdio(7I)