diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/fdc/fdc.c | 3 | ||||
-rw-r--r-- | sys/isa/fd.c | 3 | ||||
-rw-r--r-- | sys/kern/subr_disklabel.c | 29 | ||||
-rw-r--r-- | sys/kern/subr_diskmbr.c | 4 | ||||
-rw-r--r-- | sys/pc98/cbus/fdc.c | 2 | ||||
-rw-r--r-- | sys/pc98/pc98/diskslice_machdep.c | 4 | ||||
-rw-r--r-- | sys/pc98/pc98/fd.c | 2 | ||||
-rw-r--r-- | sys/pc98/pc98/wd.c | 2 | ||||
-rw-r--r-- | sys/sys/disklabel.h | 2 | ||||
-rw-r--r-- | sys/sys/diskmbr.h | 2 | ||||
-rw-r--r-- | sys/sys/diskpc98.h | 2 |
11 files changed, 23 insertions, 32 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 214aac6..e82bbd5 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -2224,8 +2224,7 @@ retrier(struct fdc_data *fdc) /* Trick diskerr */ bp->bio_dev = makedev(major(bp->bio_dev), (FDUNIT(minor(bp->bio_dev))<<3)|RAW_PART); - diskerr(bp, "hard error", LOG_PRINTF, - fdc->fd->skip / DEV_BSIZE, + diskerr(bp, "hard error", fdc->fd->skip / DEV_BSIZE, (struct disklabel *)NULL); bp->bio_dev = sav_bio_dev; if (fdc->flags & FDC_STAT_VALID) diff --git a/sys/isa/fd.c b/sys/isa/fd.c index 214aac6..e82bbd5 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -2224,8 +2224,7 @@ retrier(struct fdc_data *fdc) /* Trick diskerr */ bp->bio_dev = makedev(major(bp->bio_dev), (FDUNIT(minor(bp->bio_dev))<<3)|RAW_PART); - diskerr(bp, "hard error", LOG_PRINTF, - fdc->fd->skip / DEV_BSIZE, + diskerr(bp, "hard error", fdc->fd->skip / DEV_BSIZE, (struct disklabel *)NULL); bp->bio_dev = sav_bio_dev; if (fdc->flags & FDC_STAT_VALID) diff --git a/sys/kern/subr_disklabel.c b/sys/kern/subr_disklabel.c index d7d5dce..1b18c7d 100644 --- a/sys/kern/subr_disklabel.c +++ b/sys/kern/subr_disklabel.c @@ -332,43 +332,36 @@ hp0g: hard error reading fsbn 12345 of 12344-12347 (hp0 bn %d cn %d tn %d sn %d) * if the offset of the error in the transfer and a disk label * are both available. blkdone should be -1 if the position of the error * is unknown; the disklabel pointer may be null from drivers that have not - * been converted to use them. The message is printed with printf - * if pri is LOG_PRINTF, otherwise it uses log at the specified priority. - * The message should be completed (with at least a newline) with printf - * or addlog, respectively. There is no trailing space. + * been converted to use them. The message is printed with printf. + * The message should be completed with at least a newline. There is no + * trailing space. */ void -diskerr(bp, what, pri, blkdone, lp) +diskerr(bp, what, blkdone, lp) struct bio *bp; char *what; - int pri, blkdone; + int blkdone; register struct disklabel *lp; { int unit = dkunit(bp->bio_dev); int slice = dkslice(bp->bio_dev); int part = dkpart(bp->bio_dev); - register int (*pr) __P((const char *, ...)); char partname[2]; char *sname; daddr_t sn; - if (pri != LOG_PRINTF) { - log(pri, "%s", ""); - pr = addlog; - } else - pr = printf; sname = dsname(bp->bio_dev, unit, slice, part, partname); - (*pr)("%s%s: %s %sing fsbn ", sname, partname, what, + printf("%s%s: %s %sing fsbn ", sname, partname, what, bp->bio_cmd == BIO_READ ? "read" : "writ"); sn = bp->bio_blkno; if (bp->bio_bcount <= DEV_BSIZE) - (*pr)("%ld", (long)sn); + printf("%ld", (long)sn); else { if (blkdone >= 0) { sn += blkdone; - (*pr)("%ld of ", (long)sn); + printf("%ld of ", (long)sn); } - (*pr)("%ld-%ld", (long)bp->bio_blkno, + printf("%ld-%ld", (long)bp->bio_blkno, (long)(bp->bio_blkno + (bp->bio_bcount - 1) / DEV_BSIZE)); } if (lp && (blkdone >= 0 || bp->bio_bcount <= lp->d_secsize)) { @@ -383,10 +376,10 @@ diskerr(bp, what, pri, blkdone, lp) * independent of slices, labels and bad sector remapping, * but some drivers don't set bp->b_pblkno. */ - (*pr)(" (%s bn %ld; cn %ld", sname, (long)sn, + printf(" (%s bn %ld; cn %ld", sname, (long)sn, (long)(sn / lp->d_secpercyl)); sn %= (long)lp->d_secpercyl; - (*pr)(" tn %ld sn %ld)", (long)(sn / lp->d_nsectors), + printf(" tn %ld sn %ld)", (long)(sn / lp->d_nsectors), (long)(sn % lp->d_nsectors)); } } diff --git a/sys/kern/subr_diskmbr.c b/sys/kern/subr_diskmbr.c index 842fed1..593d71b 100644 --- a/sys/kern/subr_diskmbr.c +++ b/sys/kern/subr_diskmbr.c @@ -192,7 +192,7 @@ reread_mbr: DEV_STRATEGY(bp, 1); if (bufwait(bp) != 0) { diskerr(&bp->b_io, "reading primary partition table: error", - LOG_PRINTF, 0, (struct disklabel *)NULL); + 0, (struct disklabel *)NULL); printf("\n"); error = EIO; goto done; @@ -408,7 +408,7 @@ mbr_extended(dev, lp, ssp, ext_offset, ext_size, base_ext_offset, nsectors, DEV_STRATEGY(bp, 1); if (bufwait(bp) != 0) { diskerr(&bp->b_io, "reading extended partition table: error", - LOG_PRINTF, 0, (struct disklabel *)NULL); + 0, (struct disklabel *)NULL); printf("\n"); goto done; } diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index 7a635b4..a58019b 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -2665,7 +2665,7 @@ retrier(struct fdc_data *fdc) /* Trick diskerr */ bp->bio_dev = makedev(major(bp->bio_dev), (FDUNIT(minor(bp->bio_dev))<<3)|RAW_PART); - diskerr(bp, "hard error", LOG_PRINTF, + diskerr(bp, "hard error", fdc->fd->skip / DEV_BSIZE, (struct disklabel *)NULL); bp->bio_dev = sav_bio_dev; diff --git a/sys/pc98/pc98/diskslice_machdep.c b/sys/pc98/pc98/diskslice_machdep.c index 027549b..a9cc60f 100644 --- a/sys/pc98/pc98/diskslice_machdep.c +++ b/sys/pc98/pc98/diskslice_machdep.c @@ -252,7 +252,7 @@ reread_mbr: DEV_STRATEGY(bp, 1); if (bufwait(bp) != 0) { diskerr(&bp->b_io, "reading primary partition table: error", - LOG_PRINTF, 0, (struct disklabel *)NULL); + 0, (struct disklabel *)NULL); printf("\n"); error = EIO; goto done; @@ -553,7 +553,7 @@ mbr_extended(dev, lp, ssp, ext_offset, ext_size, base_ext_offset, nsectors, BUF_STRATEGY(bp, 1); if (bufwait(bp) != 0) { diskerr(bp, "reading extended partition table: error", - LOG_PRINTF, 0, (struct disklabel *)NULL); + 0, (struct disklabel *)NULL); printf("\n"); goto done; } diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c index 7a635b4..a58019b 100644 --- a/sys/pc98/pc98/fd.c +++ b/sys/pc98/pc98/fd.c @@ -2665,7 +2665,7 @@ retrier(struct fdc_data *fdc) /* Trick diskerr */ bp->bio_dev = makedev(major(bp->bio_dev), (FDUNIT(minor(bp->bio_dev))<<3)|RAW_PART); - diskerr(bp, "hard error", LOG_PRINTF, + diskerr(bp, "hard error", fdc->fd->skip / DEV_BSIZE, (struct disklabel *)NULL); bp->bio_dev = sav_bio_dev; diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c index 513e3eb..7f6ebe0 100644 --- a/sys/pc98/pc98/wd.c +++ b/sys/pc98/pc98/wd.c @@ -1880,7 +1880,7 @@ wderror(struct bio *bp, struct softc *du, char *mesg) if (bp == NULL) printf("wd%d: %s", du->dk_lunit, mesg); else - diskerr(bp, mesg, LOG_PRINTF, du->dk_skip, + diskerr(bp, mesg, du->dk_skip, dsgetlabel(bp->bio_dev, du->dk_slices)); printf(" (status %b error %b)\n", du->dk_status, WDCS_BITS, du->dk_error, WDERR_BITS); diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index 1c9a8be..e66b75e 100644 --- a/sys/sys/disklabel.h +++ b/sys/sys/disklabel.h @@ -459,7 +459,7 @@ struct bio_queue_head; int bounds_check_with_label __P((struct bio *bp, struct disklabel *lp, int wlabel)); -void diskerr __P((struct bio *bp, char *what, int pri, int blkdone, +void diskerr __P((struct bio *bp, char *what, int blkdone, struct disklabel *lp)); void disksort __P((struct buf *ap, struct buf *bp)); char *readdisklabel __P((dev_t dev, struct disklabel *lp)); diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h index 1c9a8be..e66b75e 100644 --- a/sys/sys/diskmbr.h +++ b/sys/sys/diskmbr.h @@ -459,7 +459,7 @@ struct bio_queue_head; int bounds_check_with_label __P((struct bio *bp, struct disklabel *lp, int wlabel)); -void diskerr __P((struct bio *bp, char *what, int pri, int blkdone, +void diskerr __P((struct bio *bp, char *what, int blkdone, struct disklabel *lp)); void disksort __P((struct buf *ap, struct buf *bp)); char *readdisklabel __P((dev_t dev, struct disklabel *lp)); diff --git a/sys/sys/diskpc98.h b/sys/sys/diskpc98.h index 1c9a8be..e66b75e 100644 --- a/sys/sys/diskpc98.h +++ b/sys/sys/diskpc98.h @@ -459,7 +459,7 @@ struct bio_queue_head; int bounds_check_with_label __P((struct bio *bp, struct disklabel *lp, int wlabel)); -void diskerr __P((struct bio *bp, char *what, int pri, int blkdone, +void diskerr __P((struct bio *bp, char *what, int blkdone, struct disklabel *lp)); void disksort __P((struct buf *ap, struct buf *bp)); char *readdisklabel __P((dev_t dev, struct disklabel *lp)); |