summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2012-08-12 14:16:21 +0000
committerae <ae@FreeBSD.org>2012-08-12 14:16:21 +0000
commit49b1966aa7bc5735883383c710805884c5702545 (patch)
tree42ec247ac79b44d0f698ce28572a25e53e9e099c /sys/boot/common
parent2d48812b47fa6c0f28066a552ec406bc5ca3c3ee (diff)
downloadFreeBSD-src-49b1966aa7bc5735883383c710805884c5702545.zip
FreeBSD-src-49b1966aa7bc5735883383c710805884c5702545.tar.gz
Add more debug messages.
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/disk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/boot/common/disk.c b/sys/boot/common/disk.c
index f039e1d..5711a10 100644
--- a/sys/boot/common/disk.c
+++ b/sys/boot/common/disk.c
@@ -162,7 +162,7 @@ disk_open(struct disk_devdesc *dev, off_t mediasize, u_int sectorsize)
dev->d_opendata = od;
od->mediasize = mediasize;
od->sectorsize = sectorsize;
- DEBUG("open '%s', unit %d slice %d partition %d",
+ DEBUG("%s: unit %d, slice %d, partition %d",
disk_fmtdev(dev), dev->d_unit, dev->d_slice, dev->d_partition);
/* Determine disk layout. */
@@ -206,10 +206,14 @@ disk_open(struct disk_devdesc *dev, off_t mediasize, u_int sectorsize)
out:
if (table != NULL)
ptable_close(table);
+
if (rc != 0) {
if (od->table != NULL)
ptable_close(od->table);
free(od);
+ DEBUG("%s: could not open", disk_fmtdev(dev));
+ } else {
+ DEBUG("%s: offset %lld", disk_fmtdev(dev), dev->d_offset);
}
return (rc);
}
@@ -220,6 +224,7 @@ disk_close(struct disk_devdesc *dev)
struct open_disk *od;
od = (struct open_disk *)dev->d_opendata;
+ DEBUG("%s: closed", disk_fmtdev(dev));
ptable_close(od->table);
free(od);
return (0);
OpenPOWER on IntegriCloud