All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wic: partitionedfs: account for non-table partitions when checking if logical parititon is needed
@ 2017-01-16 10:41 Maciej Borzecki
  0 siblings, 0 replies; only message in thread
From: Maciej Borzecki @ 2017-01-16 10:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Maciej Borzecki

Commit 8c1c43b7901a9fcd8b279eb4250b08157ad345b7 `wic: Create a logical partition
only when it is really mandatory` did not account for partitions that are not
present in partition table.

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
---
 scripts/lib/wic/utils/partitionedfs.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 68301f0b476ed48edfcb4dcad0df903474d13b50..721d51432605fe71c02c59a8d81c833cba1d445f 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -201,7 +201,8 @@ class Image():
                 part['num'] = 0
 
             if disk['ptable_format'] == "msdos":
-                if len(self.partitions) > 4:
+                # only count the partitions that are in partition table
+                if len([p for p in self.partitions if not p['no_table']]) > 4:
                     if disk['realpart'] > 3:
                         part['type'] = 'logical'
                         part['num'] = disk['realpart'] + 1
-- 
2.5.5



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-16 10:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-16 10:41 [PATCH] wic: partitionedfs: account for non-table partitions when checking if logical parititon is needed Maciej Borzecki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.