1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-04 12:52:15 +00:00

Don't pick up a name from the dev_t if it is not there.

This commit is contained in:
Poul-Henning Kamp 2003-03-03 11:14:36 +00:00
parent 6dca5fe95d
commit a9463ba804
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111808

View File

@ -32,7 +32,13 @@ disk_err(struct bio *bp, const char *what, int blkdone, int nl)
{
daddr_t sn;
printf("%s: %s ", devtoname(bp->bio_dev), what);
if (bp->bio_dev != NULL)
printf("%s: %s ", devtoname(bp->bio_dev), what);
else if (bp->bio_disk != NULL)
printf("%s%d: %s ",
bp->bio_disk->d_name, bp->bio_disk->d_unit, what);
else
printf("disk??: %s ", what);
switch(bp->bio_cmd) {
case BIO_READ: printf("cmd=read "); break;
case BIO_WRITE: printf("cmd=write "); break;