summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/utils
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/utils')
-rw-r--r--scripts/lib/wic/utils/partitionedfs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 8f4db4e17d..46b5d345c7 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -95,7 +95,7 @@ class Image():
95 ks_pnum = len(self.partitions) 95 ks_pnum = len(self.partitions)
96 96
97 # Converting kB to sectors for parted 97 # Converting kB to sectors for parted
98 size = size * 1024 / self.sector_size 98 size = size * 1024 // self.sector_size
99 99
100 part = {'ks_pnum': ks_pnum, # Partition number in the KS file 100 part = {'ks_pnum': ks_pnum, # Partition number in the KS file
101 'size': size, # In sectors 101 'size': size, # In sectors
@@ -173,12 +173,12 @@ class Image():
173 # gaps we could enlargea the previous partition? 173 # gaps we could enlargea the previous partition?
174 174
175 # Calc how much the alignment is off. 175 # Calc how much the alignment is off.
176 align_sectors = disk['offset'] % (part['align'] * 1024 / self.sector_size) 176 align_sectors = disk['offset'] % (part['align'] * 1024 // self.sector_size)
177 177
178 if align_sectors: 178 if align_sectors:
179 # If partition is not aligned as required, we need 179 # If partition is not aligned as required, we need
180 # to move forward to the next alignment point 180 # to move forward to the next alignment point
181 align_sectors = (part['align'] * 1024 / self.sector_size) - align_sectors 181 align_sectors = (part['align'] * 1024 // self.sector_size) - align_sectors
182 182
183 msger.debug("Realignment for %s%s with %s sectors, original" 183 msger.debug("Realignment for %s%s with %s sectors, original"
184 " offset %s, target alignment is %sK." % 184 " offset %s, target alignment is %sK." %