xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "YOUNG, MICHAEL A." <m.a.young@durham.ac.uk>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Steven Haigh <netwiz@crc.id.au>
Subject: Re: [Xen-devel] [PATCH] failing to set value to 0 in Grub2ConfigFile
Date: Tue, 13 Aug 2019 22:09:39 +0100	[thread overview]
Message-ID: <5d38908a-30b9-6ca6-c5de-f612679b2f0e@citrix.com> (raw)
In-Reply-To: <alpine.LFD.2.21.1908132143580.3016@austen3.home>

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

On 13/08/2019 22:02, YOUNG, MICHAEL A. wrote:
> I have been looking at the pygrub code to see if it is possible to cope 
> with grub files with BLSCFG and spotted this minor issue in GrubConf.py 
> where the code intends to replace ${saved_entry} and ${next_entry} with 0 
> but doesn't succeed.
>
> Signed-off-by: Michael Young <m.a.young@durham.ac.uk>

Ah - this looks suspiciously like it might be the bugfix for an issue
reported by Steven.

Steven - do you mind giving this patch a try for your "Fedora 30 DomU -
pygrub always boots the second menu option" problem?

~Andrew

[-- Attachment #2: 0001-failing-to-set-value-to-0-in-Grub2ConfigFile.patch --]
[-- Type: text/plain, Size: 1351 bytes --]

From a08eff9b1b881dc61f9427153706e2d5b3bd0e01 Mon Sep 17 00:00:00 2001
From: Michael Young <m.a.young@durham.ac.uk>
Date: Tue, 13 Aug 2019 21:15:02 +0100
Subject: [PATCH] failing to set value to 0 in Grub2ConfigFile

In Grub2ConfigFile the code to handle ${saved_entry} and ${next_entry}
sets arg = "0" but this now does nothing following
"tools/pygrub: Make pygrub understand default entry in string format"
d1b93ea2615bd789ee28901f1f1c05ffb319cb61
which replaced arg.strip() with arg_strip in the following line.
This patch restores the previous behaviour.
---
 tools/pygrub/src/GrubConf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
index 594139bac7..73f1bbed2f 100644
--- a/tools/pygrub/src/GrubConf.py
+++ b/tools/pygrub/src/GrubConf.py
@@ -440,7 +440,7 @@ class Grub2ConfigFile(_GrubConfigFile):
                     arg_strip = arg.strip()
                     if arg_strip == "${saved_entry}" or arg_strip == "${next_entry}":
                         logging.warning("grub2's saved_entry/next_entry not supported")
-                        arg = "0"
+                        arg_strip = "0"
                     setattr(self, self.commands[com], arg_strip)
                 else:
                     logging.info("Ignored directive %s" %(com,))
-- 
2.21.0


[-- Attachment #3: Type: text/plain, Size: 157 bytes --]

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

  reply	other threads:[~2019-08-13 21:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 21:02 [Xen-devel] [PATCH] failing to set value to 0 in Grub2ConfigFile YOUNG, MICHAEL A.
2019-08-13 21:09 ` Andrew Cooper [this message]
2019-08-13 21:51   ` YOUNG, MICHAEL A.
2019-08-14  5:14     ` Steven Haigh
2019-08-14 11:17 ` Andrew Cooper

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=5d38908a-30b9-6ca6-c5de-f612679b2f0e@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=m.a.young@durham.ac.uk \
    --cc=netwiz@crc.id.au \
    --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).