From: Artem Bityutskiy Date: Thu, 14 Feb 2013 12:28:10 +0000 (+0200) Subject: partitionedfs: improve debugging prints X-Git-Tag: 0.17~22^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7396a04bc72d5ac5704bf05d18e3f4f97df6aba3;p=platform%2Fupstream%2Fmic.git partitionedfs: improve debugging prints Print the starting and ending partition sector numbers as well as partition size. This makes it easier to debug issues. Change-Id: Ie96872f6902d2b7c12bb043879e06d5b839d986c Signed-off-by: Artem Bityutskiy --- diff --git a/mic/utils/partitionedfs.py b/mic/utils/partitionedfs.py index c89fd33..60ae93c 100644 --- a/mic/utils/partitionedfs.py +++ b/mic/utils/partitionedfs.py @@ -225,10 +225,11 @@ class PartitionedMount(Mount): p['start'] = d['offset'] d['offset'] += p['size'] d['partitions'].append(n) - msger.debug("Assigned %s to %s%d at Sector %d with size %d sectors " - "/ %d bytes." % (p['mountpoint'], p['disk_name'], - p['num'], p['start'], p['size'], - p['size'] * self.sector_size)) + msger.debug("Assigned %s to %s%d, sectors range %d-%d size %d " + "sectors (%d bytes)." \ + % (p['mountpoint'], p['disk_name'], p['num'], + p['start'], p['start'] + p['size'] - 1, + p['size'], p['size'] * self.sector_size)) # Once all the partitions have been layed out, we can calculate the # minumim disk sizes. @@ -265,8 +266,8 @@ class PartitionedMount(Mount): # Start is included to the size so we need to substract one from the end. end = start + size - 1 - msger.debug("Added '%s' part at Sector %d with size %d sectors" % - (parttype, start, end)) + msger.debug("Added '%s' partition, sectors %d-%d, size %d sectors" % + (parttype, start, end, size)) args = ["-s", device, "unit", "s", "mkpart", parttype] if fstype: