From 1919170e9039df45d87abbe1d7b256cc0db1ed19 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 20 Sep 2002 12:52:03 +0000 Subject: Make FreeBSD "struct disklabel" agnostic, step 311 of 723: Rename diskerr() to disk_err() for naming consistency. Drop the by now entirely useless struct disklabel argument. Add a flag argument for new-line termination. Fix a couple of printf-format-casts to %j instead of %l. Correctly print the name of all bio commands. Move the function from subr_disklabel.c to subr_disk.c, and from to . Use the new disk_err() throughout, #include as needed. Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs. Remove unused disklabel members of softc for aac, amr and mlx, which seem to originally have been intended for diskerr() use, but which only rotted and got Copy&Pasted at least two times to many. Sponsored by: DARPA & NAI Labs. --- sys/dev/ata/ata-disk.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sys/dev/ata/ata-disk.c') diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index 1211e0a..b4a8656 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -563,19 +563,17 @@ ad_interrupt(struct ad_request *request) /* do we have a corrected soft error ? */ if (adp->device->channel->status & ATA_S_CORR) - diskerr(request->bp, "soft error (ECC corrected)", - request->blockaddr + (request->donecount / DEV_BSIZE), - &adp->disk.d_label); + disk_err(request->bp, "soft error (ECC corrected)", + request->blockaddr + (request->donecount / DEV_BSIZE), 1); /* did any real errors happen ? */ if ((adp->device->channel->status & ATA_S_ERROR) || (request->flags & ADR_F_DMA_USED && dma_stat & ATA_BMSTAT_ERROR)) { adp->device->channel->error = ATA_INB(adp->device->channel->r_io, ATA_ERROR); - diskerr(request->bp, (adp->device->channel->error & ATA_E_ICRC) ? + disk_err(request->bp, (adp->device->channel->error & ATA_E_ICRC) ? "UDMA ICRC error" : "hard error", - request->blockaddr + (request->donecount / DEV_BSIZE), - &adp->disk.d_label); + request->blockaddr + (request->donecount / DEV_BSIZE), 1); /* if this is a UDMA CRC error, reinject request */ if (request->flags & ADR_F_DMA_USED && -- cgit v1.1