All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Anuj Mittal" <anuj.mittal@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [zeus][PATCH 9/9] wic/direct: reserve 2 sector for extended partition
Date: Thu, 26 Mar 2020 16:53:36 +0800	[thread overview]
Message-ID: <0743dcd0cd70dee87a49d3bcd017168352e60982.1585211896.git.anuj.mittal@intel.com> (raw)
In-Reply-To: <cover.1585211896.git.anuj.mittal@intel.com>
In-Reply-To: <cover.1585211896.git.anuj.mittal@intel.com>

From: Chee Yang Lee <chee.yang.lee@intel.com>

extended partition should reserve at least 2 unallocated sectors
between the start of the extended partition and the start of a
logical partition.

[YOCTO #13658]

(From OE-Core rev: 884c8a0e50a49bdca5e048197a9dc0ff37cc8d1a)

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 590555e3b8ccbd94b628aa6778adea7f4538d966)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 scripts/lib/wic/plugins/imager/direct.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 2441cc3..5148df2 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -403,7 +403,7 @@ class PartitionedImage():
                 # Reserve a sector for EBR for every logical partition
                 # before alignment is performed.
                 if part.type == 'logical':
-                    self.offset += 1
+                    self.offset += 2
 
             align_sectors = 0
             if part.align:
@@ -446,7 +446,7 @@ class PartitionedImage():
                         self.extendedpart = part.num
                     else:
                         self.extended_size_sec += align_sectors
-                    self.extended_size_sec += part.size_sec + 1
+                    self.extended_size_sec += part.size_sec + 2
                 else:
                     self.primary_part_num += 1
                     part.num = self.primary_part_num
@@ -512,7 +512,7 @@ class PartitionedImage():
                 # add a sector at the back, so that there is enough
                 # room for all logical partitions.
                 self._create_partition(self.path, "extended",
-                                       None, part.start - 1,
+                                       None, part.start - 2,
                                        self.extended_size_sec)
 
             if part.fstype == "swap":
-- 
2.7.4


      parent reply	other threads:[~2020-03-26  8:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  8:53 [zeus][PATCH 0/9] zeus review Anuj Mittal
2020-03-26  8:53 ` [zeus][PATCH 1/9] icu: fix CVE-2020-10531 Anuj Mittal
2020-03-26  8:53 ` [zeus][PATCH 2/9] screen: fix CVE-2020-9366 Anuj Mittal
2020-03-26  8:53 ` [zeus][PATCH 3/9] sanity: check for more bits of Python Anuj Mittal
2020-03-26  8:53 ` [zeus][PATCH 4/9] nfs-utils: Disable statx if using glibc emulation Anuj Mittal
2020-03-26  8:53 ` [zeus][PATCH 5/9] e2fsprogs: fix CVE-2019-5188 Anuj Mittal
2020-03-26  8:53 ` [zeus][PATCH 6/9] e2fsprogs: backport upstream patch Anuj Mittal
2020-03-26  8:53 ` [zeus][PATCH 7/9] security_flags.inc: fix flags missing from SDK toolchain Anuj Mittal
2020-03-26  8:53 ` [zeus][PATCH 8/9] linux-yocto/4.19: update to v4.19.107 Anuj Mittal
2020-03-26  8:53 ` Anuj Mittal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0743dcd0cd70dee87a49d3bcd017168352e60982.1585211896.git.anuj.mittal@intel.com \
    --to=anuj.mittal@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.