Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [wic][PATCH 2/7] wic: check if part_type is set only for msdos partition table
Date: Tue,  2 Jun 2015 17:02:00 +0300	[thread overview]
Message-ID: <1433253725-14089-3-git-send-email-ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <1433253725-14089-1-git-send-email-ed.bartosh@linux.intel.com>

Specifying partition type(GUID) makes sense for gpt partition table.

Current code checks if part-type is specified and throws exception
if it is. This makes sense to do only for msdos partition table.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>

diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 06d4eac..eacf267 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -138,7 +138,7 @@ class Image:
                 raise ImageError("No disk %s for partition %s" \
                                  % (p['disk_name'], p['mountpoint']))
 
-            if p['part_type']:
+            if ptable_format == 'msdos' and p['part_type']:
                 # The --part-type can also be implemented for MBR partitions,
                 # in which case it would map to the 1-byte "partition type"
                 # filed at offset 3 of the partition entry.
-- 
2.1.4



  parent reply	other threads:[~2015-06-02 15:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 14:01 [wic][PATCH 0/7] wic: Fixed support of GPT partition table Ed Bartosh
2015-06-02 14:01 ` [wic][PATCH 1/7] wic: set legacy_boot flag for gpt partitions Ed Bartosh
2015-06-02 14:02 ` Ed Bartosh [this message]
2015-06-02 14:02 ` [wic][PATCH 3/7] wic: Add gpt to the list of supported partition table formats Ed Bartosh
2015-06-02 14:02 ` [wic][PATCH 4/7] wic: Use gptmbr.bin MBR for gpt partitions Ed Bartosh
2015-06-02 14:02 ` [wic][PATCH 5/7] wic: Make _ptable_format public Ed Bartosh
2015-06-02 14:02 ` [wic][PATCH 6/7] wic: create directdisk-gpt.wks Ed Bartosh
2015-06-02 14:02 ` [wic][PATCH 7/7] wic: Test creation of directdisk image with GPT table Ed Bartosh

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=1433253725-14089-3-git-send-email-ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox