Correct image size computation
authorNikos Skalkotos <skalkoto@grnet.gr>
Wed, 21 Mar 2012 18:32:50 +0000 (20:32 +0200)
committerNikos Skalkotos <skalkoto@grnet.gr>
Wed, 21 Mar 2012 18:35:36 +0000 (20:35 +0200)
This commit fixes a bug where size method in DiskDevice returned the
payload size of the device one byte shorter than it actually was.

image_creator/disk.py

index b84de1a..7fc0cdf 100644 (file)
@@ -300,6 +300,6 @@ class DiskDevice(object):
         dev = self.g.part_to_dev(self.root)
         last = self.g.part_list(dev)[-1]
 
-        return last['part_end']
+        return last['part_end'] + 1
 
 # vim: set sta sts=4 shiftwidth=4 sw=4 et ai :