summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-08-25 23:12:24 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-27 22:30:07 +0100
commit0ad7e3d1eaaa16f53a275e70b8adbc0a83f4efc4 (patch)
tree8d9af934b64090c625e581e612ad03a6e88d0920 /scripts
parent60efc91d2b57255b032ac9e26e4b698256215a25 (diff)
downloadpoky-0ad7e3d1eaaa16f53a275e70b8adbc0a83f4efc4.tar.gz
wic: convert partition number to int
Converted partition number to int in order to use it as an index in the list of partitions. (From OE-Core rev: f901f23eb05cd6b86a49ef1b6ec7efaf72f6d685) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/engine.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index a965b8b901..e169147aba 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -267,7 +267,7 @@ class Disk:
267 self._psector_size = int(psector_size) 267 self._psector_size = int(psector_size)
268 for line in splitted[2:]: 268 for line in splitted[2:]:
269 pnum, start, end, size, fstype = line.split(':')[:5] 269 pnum, start, end, size, fstype = line.split(':')[:5]
270 partition = parttype(pnum, int(start[:-1]), int(end[:-1]), 270 partition = parttype(int(pnum), int(start[:-1]), int(end[:-1]),
271 int(size[:-1]), fstype) 271 int(size[:-1]), fstype)
272 self._partitions[pnum] = partition 272 self._partitions[pnum] = partition
273 273
@@ -341,7 +341,7 @@ def wic_ls(args, native_sysroot):
341 if disk.partitions: 341 if disk.partitions:
342 print('Num Start End Size Fstype') 342 print('Num Start End Size Fstype')
343 for part in disk.partitions.values(): 343 for part in disk.partitions.values():
344 print("{:2s} {:12d} {:12d} {:12d} {}".format(\ 344 print("{:2d} {:12d} {:12d} {:12d} {}".format(\
345 part.pnum, part.start, part.end, 345 part.pnum, part.start, part.end,
346 part.size, part.fstype)) 346 part.size, part.fstype))
347 else: 347 else: