diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-12-04 09:01:44 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-12-14 20:17:23 +0300 |
commit | 37a0e4ddff58c0120cc5cfef104b60d0e180638c (patch) | |
tree | 1628857a2eb33ab517ba93d6a3ca25e55bd3e628 /import-layers/yocto-poky/scripts/lib/wic/utils/partitionedfs.py | |
parent | 3c4c45d1e9a2324191a8640b22df1b71f15f3037 (diff) | |
download | openbmc-37a0e4ddff58c0120cc5cfef104b60d0e180638c.tar.xz |
Squashed 'import-layers/yocto-poky/' changes from dc8508f6099..67491b0c104
Yocto 2.2.2 (Morty)
Change-Id: Id9a452e28940d9f166957de243d9cb1d8818704e
git-subtree-dir: import-layers/yocto-poky
git-subtree-split: 67491b0c104101bb9f366d697edd23c895be4302
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'import-layers/yocto-poky/scripts/lib/wic/utils/partitionedfs.py')
-rw-r--r-- | import-layers/yocto-poky/scripts/lib/wic/utils/partitionedfs.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/import-layers/yocto-poky/scripts/lib/wic/utils/partitionedfs.py b/import-layers/yocto-poky/scripts/lib/wic/utils/partitionedfs.py index cb03009fc..9ea4a30cb 100644 --- a/import-layers/yocto-poky/scripts/lib/wic/utils/partitionedfs.py +++ b/import-layers/yocto-poky/scripts/lib/wic/utils/partitionedfs.py @@ -92,7 +92,7 @@ class Image(): def add_partition(self, size, disk_name, mountpoint, source_file=None, fstype=None, label=None, fsopts=None, boot=False, align=None, no_table=False, part_type=None, uuid=None, system_id=None): - """ Add the next partition. Prtitions have to be added in the + """ Add the next partition. Partitions have to be added in the first-to-last order. """ ks_pnum = len(self.partitions) @@ -201,9 +201,10 @@ class Image(): part['num'] = 0 if disk['ptable_format'] == "msdos": - if disk['realpart'] > 3: - part['type'] = 'logical' - part['num'] = disk['realpart'] + 1 + if len(self.partitions) > 4: + if disk['realpart'] > 3: + part['type'] = 'logical' + part['num'] = disk['realpart'] + 1 disk['partitions'].append(num) msger.debug("Assigned %s to %s%d, sectors range %d-%d size %d " @@ -292,7 +293,7 @@ class Image(): # even number of sectors. if part['mountpoint'] == "/boot" and part['fstype'] in ["vfat", "msdos"] \ and part['size'] % 2: - msger.debug("Substracting one sector from '%s' partition to " \ + msger.debug("Subtracting one sector from '%s' partition to " \ "get even number of sectors for the partition" % \ part['mountpoint']) part['size'] -= 1 |