diff options
Diffstat (limited to 'sys/kern/subr_disklabel.c')
-rw-r--r-- | sys/kern/subr_disklabel.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/sys/kern/subr_disklabel.c b/sys/kern/subr_disklabel.c index e10bc61..a650e3a 100644 --- a/sys/kern/subr_disklabel.c +++ b/sys/kern/subr_disklabel.c @@ -367,60 +367,3 @@ done: brelse(bp); return (error); } - -/* - * Disk error is the preface to plaintive error messages - * about failing disk transfers. It prints messages of the form - -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. - * The message should be completed with at least a newline. There is no - * trailing space. - */ -void -diskerr(bp, what, blkdone, lp) - struct bio *bp; - char *what; - int blkdone; - register struct disklabel *lp; -{ - int part = dkpart(bp->bio_dev); - char partname[2]; - char *sname; - daddr_t sn; - - *partname = '\0'; - sname = bp->bio_dev->si_name; - 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) - printf("%jd", (intmax_t)sn); - else { - if (blkdone >= 0) { - sn += blkdone; - printf("%jd of ", (intmax_t)sn); - } - 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)) { - sn += lp->d_partitions[part].p_offset; - /* - * XXX should add slice offset and not print the slice, - * but we don't know the slice pointer. - * XXX should print bp->b_pblkno so that this will work - * independent of slices, labels and bad sector remapping, - * but some drivers don't set bp->b_pblkno. - */ - printf(" (%s bn %jd; cn %jd", sname, (intmax_t)sn, - (intmax_t)(sn / lp->d_secpercyl)); - sn %= lp->d_secpercyl; - printf(" tn %ld sn %ld)", (long)(sn / lp->d_nsectors), - (long)(sn % lp->d_nsectors)); - } -} |