xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Géza Gémes" <geza.gemes@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: sstabellini@kernel.org, george.dunlap@citrix.com,
	"Géza Gémes" <geza.gemes@gmail.com>
Subject: [PATCH 01/10] Fix lopartsetup parsing of fdisk output
Date: Sat, 18 Mar 2017 15:00:02 +0100	[thread overview]
Message-ID: <1489845611-6322-2-git-send-email-geza.gemes@gmail.com> (raw)
In-Reply-To: <1489845611-6322-1-git-send-email-geza.gemes@gmail.com>

Change lopartsetup in order to handle partitions, which have the
boot flag enabled.

Signed-off-by: Géza Gémes <geza.gemes@gmail.com>
---
 scripts/lopartsetup | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/lopartsetup b/scripts/lopartsetup
index bf33a28..04ce3cc 100755
--- a/scripts/lopartsetup
+++ b/scripts/lopartsetup
@@ -58,7 +58,11 @@ index=0
 for i in "`fdisk -lu $filename 2>/dev/null | grep -e "^$filename"`"
 do
     index=$((index+1))
-    offset=`echo $i | tr -s " " | cut -d " " -f 2`
+    offset=`echo "$i" | tr -s " " | cut -d " " -f 2`
+    if [[ "$offset" == "*" ]]
+    then
+        offset=`echo "$i" | tr -s " " | cut -d " " -f 3`
+    fi
     offset=$((unit*offset))
 
     _create_loop_device "$filename" "$index" "$offset"
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-03-18 14:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18 14:00 [raisin][PATCH 00/10] Introduce usage of cirros images Géza Gémes
2017-03-18 14:00 ` Géza Gémes [this message]
2017-03-18 14:00 ` [PATCH 02/10] Introduce cirros tests Géza Gémes
2017-03-18 14:00 ` [PATCH 03/10] Introduce cirros-separate-kernel-pv test Géza Gémes
2017-03-18 14:00 ` [PATCH 04/10] Introduce cirros-pygrub-pv test Géza Gémes
2017-03-18 14:00 ` [PATCH 05/10] Introduce cirros-pvgrub2-pv test Géza Gémes
2017-03-18 14:00 ` [PATCH 06/10] Introduce cirros-qemu-hvm test Géza Gémes
2017-03-18 14:00 ` [PATCH 07/10] Introduce cirros-minios-stubdom-hvm test Géza Gémes
2017-03-18 14:00 ` [PATCH 08/10] Introduce cirros-qemu-pvhvm test Géza Gémes
2017-03-18 14:00 ` [PATCH 09/10] Introduce cirros-minios-stubdom-pvhvm test Géza Gémes
2017-03-18 14:00 ` [PATCH 10/10] Enable cirros tests in the default config Géza Gémes

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=1489845611-6322-2-git-send-email-geza.gemes@gmail.com \
    --to=geza.gemes@gmail.com \
    --cc=george.dunlap@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).