[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7423/8267] wic: convert partition number to int



commit 0ad7e3d1eaaa16f53a275e70b8adbc0a83f4efc4
Author: Ed Bartosh <ed bartosh linux intel com>
Date:   Fri Aug 25 23:12:24 2017 +0300

    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>

 scripts/lib/wic/engine.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index a965b8b..e169147 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:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]