From 4d56574cd4506948431006300485aec119b26b71 Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos Date: Tue, 4 Mar 2014 15:54:42 +0200 Subject: [PATCH] Print partition type in hex in disklabel.py --- snf-image-helper/disklabel.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/snf-image-helper/disklabel.py b/snf-image-helper/disklabel.py index d373b3b..6f8ea2b 100755 --- a/snf-image-helper/disklabel.py +++ b/snf-image-helper/disklabel.py @@ -74,10 +74,12 @@ class MBR(object): return struct.calcsize(MBR.Partition.fmt) def __str__(self): - start = self.unpack_chs(self.start) - end = self.unpack_chs(self.end) - return "%d %s %d %s %d %d" % (self.status, start, self.type, end, - self.first_sector, self.sector_count) + return "%02Xh %s %02Xh %s %d %d" % (self.status, + self.unpack_chs(self.start), + self.type, + self.unpack_chs(self.end), + self.first_sector, + self.sector_count) @staticmethod def unpack_chs(chs): -- 1.7.10.4