- mcb_type *mcb; /* an mcb to send commands to hdc */
- hdunit_type *hu; /* disk unit information table */
- hdctlr_type *hc; /* hdc ctlr information table */
- hdc_mid_type *id; /* the hdc module id */
- geometry_sector geometry; /* the geometry block sector */
- geometry_block *geo; /* the geometry block */
- drive_stat_type status; /* the hdc status is read to here */
- long ctlr; /* the controller number */
- long junk; /* badaddr will write junk here */
- int par; /* partition number */
- int drive; /* the drive number */
- int bus; /* the bus number */
- int i; /* temp */
- hdc_regs_type *ctlr_addr; /* hdc i/o registers */
-
- par = io->i_boff; /* io->i_part; */
- bus = 0; /* io->i_bus; */
- ctlr = HDCTLR(io->i_unit); /* io->i_ctlr; */
- drive = HDSLAVE(io->i_unit); /* io->i_drive; */
- hu = &hdc_unit[drive][ctlr][bus];
- hc = &hdc_ctlr[ctlr][bus];
- mcb = &hc->mcb;
-
- /*
- * Validate the device specification
- */
- if (ctlr >= HDC_MAXCTLR) {
+ drive_stat_type status; /* the hdc status is read to here */
+ hdc_mid_type *id; /* the hdc module id */
+ hdc_regs_type *ctlr_addr; /* hdc i/o registers */
+ hdctlr_type *hc; /* hdc ctlr information table */
+ hdunit_type *hu; /* disk unit information table */
+ geometry_sector geometry; /* the geometry block sector */
+ geometry_block *geo; /* the geometry block */
+ mcb_type *mcb; /* an mcb to send commands to hdc */
+ long junk = 0; /* badaddr will write junk here */
+ int par; /* partition number */
+ int bus, ctlr, drive, error, i, unit;
+
+ /* validate the device specification */
+ if ((ctlr = HDCTLR(io->i_unit)) >= HDC_MAXCTLR) {