printf("%ldMB, %d cyl, %d head, %d sec, %d bytes/sec, %ld sec total",
printf("%luMB, %lu cyl, %lu head, %lu sec, %lu bytes/sec, %lu sec total",
sdattach(parent, self, aux)	struct device *parent, *self;	void *aux;{	int error, result;	struct sd_softc *sd = (void *)self;	struct disk_parms *dp = &sd->params;	struct scsibus_attach_args *sa = aux;	struct scsi_link *sc_link = sa->sa_sc_link;	SC_DEBUG(sc_link, SDEV_DB2, ("sdattach: "));	/*	 * Store information needed to contact our base driver	 */	sd->sc_link = sc_link;	sd->type = (sa->sa_inqbuf->device & SID_TYPE);	sc_link->device = &sd_switch;	sc_link->device_softc = sd;	/*	 * Initialize and attach the disk structure.	 */	sd->sc_dk.dk_driver = &sddkdriver;	sd->sc_dk.dk_name = sd->sc_dev.dv_xname;	disk_attach(&sd->sc_dk);	dk_establish(&sd->sc_dk, &sd->sc_dev);	if (sc_link->flags & SDEV_ATAPI &&	    (sc_link->flags & SDEV_REMOVABLE)) {		sd->sc_ops = &sd_atapibus_ops;	} else {		sd->sc_ops = &sd_scsibus_ops;	}	if (!(sc_link->inquiry_flags & SID_RelAdr))		sc_link->quirks |= SDEV_ONLYBIG;	/*	 * Note if this device is ancient.  This is used in sdminphys().	 */	if (!(sc_link->flags & SDEV_ATAPI) &&	    (sa->sa_inqbuf->version & SID_ANSII) == 0)		sd->flags |= SDF_ANCIENT;	/*	 * Use the subdriver to request information regarding	 * the drive. We cannot use interrupts yet, so the	 * request must specify this.	 */	printf("\n");	if ((sd->sc_link->quirks & SDEV_NOSTARTUNIT) == 0) {		error = scsi_start(sd->sc_link, SSS_START,				   scsi_autoconf | SCSI_IGNORE_ILLEGAL_REQUEST |				   SCSI_IGNORE_MEDIA_CHANGE | SCSI_SILENT);	} else		error = 0;	/* Fill in name struct for spoofed label */	viscpy(sd->name.vendor, sa->sa_inqbuf->vendor, 8);	viscpy(sd->name.product, sa->sa_inqbuf->product, 16);	viscpy(sd->name.revision, sa->sa_inqbuf->revision, 4);	if (error)		result = SDGP_RESULT_OFFLINE;	else		result = (*sd->sc_ops->sdo_get_parms)(sd, &sd->params,		    scsi_autoconf | SCSI_IGNORE_MEDIA_CHANGE);	printf("%s: ", sd->sc_dev.dv_xname);	switch (result) {	case SDGP_RESULT_OK:		printf("%ldMB, %d cyl, %d head, %d sec, %d bytes/sec, %ld sec total",		    dp->disksize / (1048576 / dp->blksize), dp->cyls,		    dp->heads, dp->sectors, dp->blksize, dp->disksize);		break;	case SDGP_RESULT_OFFLINE:		printf("drive offline");		break;	case SDGP_RESULT_UNFORMATTED:		printf("unformatted media");		break;#ifdef DIAGNOSTIC	default:		panic("sdattach: unknown result from get_parms");		break;#endif	}	printf("\n");	/*	 * Establish a shutdown hook so that we can ensure that	 * our data has actually made it onto the platter at	 * shutdown time.  Note that this relies on the fact	 * that the shutdown hook code puts us at the head of	 * the list (thus guaranteeing that our hook runs before	 * our ancestors').	 */	if ((sd->sc_sdhook =	    shutdownhook_establish(sd_shutdown, sd)) == NULL)		printf("%s: WARNING: unable to establish shutdown hook\n",		    sd->sc_dev.dv_xname);}