summaryrefslogtreecommitdiffstats
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:29:46 +0100
commitf901f23eb05cd6b86a49ef1b6ec7efaf72f6d685 (patch)
tree0722bd3412fc30e44184f7dd5a9534f868a070f9
parent5c0926d8efa468177b7cb43a5f06b35058255644 (diff)
downloadopenembedded-core-contrib-f901f23eb05cd6b86a49ef1b6ec7efaf72f6d685.tar.gz
openembedded-core-contrib-f901f23eb05cd6b86a49ef1b6ec7efaf72f6d685.tar.bz2
openembedded-core-contrib-f901f23eb05cd6b86a49ef1b6ec7efaf72f6d685.zip
wic: convert partition number to int
Converted partition number to int in order to use it as an index in the list of partitions. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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:
self._psector_size = int(psector_size)
for line in splitted[2:]:
pnum, start, end, size, fstype = line.split(':')[:5]
- partition = parttype(pnum, int(start[:-1]), int(end[:-1]),
+ partition = parttype(int(pnum), int(start[:-1]), int(end[:-1]),
int(size[:-1]), fstype)
self._partitions[pnum] = partition
@@ -341,7 +341,7 @@ def wic_ls(args, native_sysroot):
if disk.partitions:
print('Num Start End Size Fstype')
for part in disk.partitions.values():
- print("{:2s} {:12d} {:12d} {:12d} {}".format(\
+ print("{:2d} {:12d} {:12d} {:12d} {}".format(\
part.pnum, part.start, part.end,
part.size, part.fstype))
else: