Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2012 14:16:21 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r239210 - head/sys/boot/common
Message-ID:  <201208121416.q7CEGL11094313@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Sun Aug 12 14:16:21 2012
New Revision: 239210
URL: http://svn.freebsd.org/changeset/base/239210

Log:
  Add more debug messages.

Modified:
  head/sys/boot/common/disk.c

Modified: head/sys/boot/common/disk.c
==============================================================================
--- head/sys/boot/common/disk.c	Sun Aug 12 09:23:55 2012	(r239209)
+++ head/sys/boot/common/disk.c	Sun Aug 12 14:16:21 2012	(r239210)
@@ -162,7 +162,7 @@ disk_open(struct disk_devdesc *dev, off_
 	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_
 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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208121416.q7CEGL11094313>