mirror of
https://git.yoctoproject.org/poky
synced 2026-04-19 06:32:13 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
60efc91d2b
commit
0ad7e3d1ea
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user