#include <sys/hdio.h>
The SMD and IPI disk drivers supplied with this release support a set of ioctl(2) requests for diagnostics and bad sector information. Basic to these ioctl() requests are the definitions in <sys/hdio.h>.
HHHHDDDDKKKKIIIIOOOOCCCCGGGGTTTTYYYYPPPPEEEE The argument is a pointer to a hdk_type structure (described below). This ioctl() gets specific information from the hard disk.
HHHHDDDDKKKKIIIIOOOOCCCCSSSSTTTTYYYYPPPPEEEE The argument is a pointer to a hdk_type
structure (described below). This
ioctl()
sets specific information about the hard disk.
////**** <<<>>> **** UUUUsssseeeedddd ffffoooorrrr ddddrrrriiiivvvveeee iiiinnnnffffoooo <<<///PPPPRRRREEEE>>>> <<<
>>> ****//// <<<///PPPPRRRREEEE>>>> ssssttttrrrruuuucccctttt hhhhddddkkkk_ttttyyyyppppeeee {{{{ uuuu_sssshhhhoooorrrrtttt hhhhddddkkkktttt_hhhhsssseeeecccctttt;;;; ////**** hhhhaaaarrrrdddd sssseeeeccccttttoooorrrr ccccoooouuuunnnntttt ((((rrrreeeeaaaadddd oooonnnnllllyyyy)))) ****//// uuuu_sssshhhhoooorrrrtttt hhhhddddkkkktttt_pppprrrroooommmmrrrreeeevvvv;;;; ////**** pppprrrroooommmm rrrreeeevvvviiiissssiiiioooonnnn ((((rrrreeeeaaaadddd oooonnnnllllyyyy)))) ****//// uuuu_cccchhhhaaaarrrr hhhhddddkkkktttt_ddddrrrrttttyyyyppppeeee;;;; ////**** ddddrrrriiiivvvveeee ttttyyyyppppeeee ((((ccccttttllllrrrr ssssppppeeeecccciiiiffffiiiicccc)))) ****//// uuuu_cccchhhhaaaarrrr hhhhddddkkkktttt_ddddrrrrssssttttaaaatttt;;;; ////**** ddddrrrriiiivvvveeee ssssttttaaaattttuuuussss ((((ccccttttllllrrrr ssssppppeeeecccciiiiffffiiiicccc,,,, rrrroooo)))) ****//// }}}};;;; <<<///PPPPRRRREEEE>>>>
HHHHDDDDKKKKIIIIOOOOCCCCGGGGBBBBAAAADDDD The argument is a pointer to a hdk_badmap structure (described below). This ioctl() is used to get the bad sector map from the disk.
HHHHDDDDKKKKIIIIOOOOCCCCSSSSBBBBAAAADDDD The argument is a pointer to a hdk_badmap structure (described below). This ioctl() is used to set the bad sector map on the disk.
////**** <<<>>> **** UUUUsssseeeedddd ffffoooorrrr bbbbaaaadddd sssseeeeccccttttoooorrrr mmmmaaaapppp <<<///PPPPRRRREEEE>>>> <<<
>>> ****//// <<<///PPPPRRRREEEE>>>> ssssttttrrrruuuucccctttt hhhhddddkkkk_bbbbaaaaddddmmmmaaaapppp {{{{ ccccaaaaddddddddrrrr_tttt hhhhddddkkkkbbbb_bbbbuuuuffffaaaaddddddddrrrr;;;; ////**** aaaaddddddddrrrreeeessssssss ooooffff uuuusssseeeerrrr''''ssss mmmmaaaapppp bbbbuuuuffffffffeeeerrrr ****//// }}}};;;; <<<///PPPPRRRREEEE>>>>
HHHHDDDDKKKKIIIIOOOOCCCCGGGGDDDDIIIIAAAAGGGG The argument is a pointer to a hdk_diag structure (described below). This ioctl() gets the most recent command that failed along with the sector and error number from the hard disk.
////**** <<<>>> **** UUUUsssseeeedddd ffffoooorrrr ddddiiiisssskkkk ddddiiiiaaaaggggnnnnoooossssttttiiiiccccssss <<<///PPPPRRRREEEE>>>> <<<
>>> ****//// <<<///PPPPRRRREEEE>>>> ssssttttrrrruuuucccctttt hhhhddddkkkk_ddddiiiiaaaagggg {{{{ uuuu_sssshhhhoooorrrrtttt hhhhddddkkkkdddd_eeeerrrrrrrrccccmmmmdddd;;;; ////**** mmmmoooosssstttt rrrreeeecccceeeennnntttt ccccoooommmmmmmmaaaannnndddd iiiinnnn eeeerrrrrrrroooorrrr ****//// ddddaaaaddddddddrrrr_tttt hhhhddddkkkkdddd_eeeerrrrrrrrsssseeeecccctttt;;;; ////**** mmmmoooosssstttt rrrreeeecccceeeennnntttt sssseeeeccccttttoooorrrr iiiinnnn eeeerrrrrrrroooorrrr ****//// uuuu_cccchhhhaaaarrrr hhhhddddkkkkdddd_eeeerrrrrrrrnnnnoooo;;;; ////**** mmmmoooosssstttt rrrreeeecccceeeennnntttt eeeerrrrrrrroooorrrr nnnnuuuummmmbbbbeeeerrrr ****//// uuuu_cccchhhhaaaarrrr hhhhddddkkkkdddd_sssseeeevvvveeeerrrreeee;;;; ////**** sssseeeevvvveeeerrrriiiittttyyyy ooooffff mmmmoooosssstttt rrrreeeecccceeeennnntttt eeeerrrrrrrroooorrrr ****//// }}}};;;; <<<///PPPPRRRREEEE>>>>