From: Matt Wilson <msw@amazon.com>
To: Miroslav Rezanina <mrezanin@redhat.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH] Fix pygrub handling non-default entry
Date: Thu, 10 Jan 2013 09:36:30 +0100 [thread overview]
Message-ID: <20130110083617.GA6316@u109add4315675089e695.ant.amazon.com> (raw)
In-Reply-To: <20130109132929.GA26888@lws.brq.redhat.com>
On Wed, Jan 09, 2013 at 02:29:29PM +0100, Miroslav Rezanina wrote:
> If we pass 0 as pygrub --entry argument (i.e. we want to boot first
> item), default value is used instead. This is dueto wrong check for
> range of allowed values of index - 0 is index of first item.
>
> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Acked-by: Matt Wilson <msw@amazon.com>
> Patch:
> ---
> diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
> index 1845485..eedfdb2 100644
> --- a/tools/pygrub/src/pygrub
> +++ b/tools/pygrub/src/pygrub
> @@ -613,7 +613,7 @@ def run_grub(file, entry, fs, cfg_args):
> # set the entry to boot as requested
> if entry is not None:
> idx = get_entry_idx(g.cf, entry)
> - if idx is not None and idx > 0 and idx < len(g.cf.images):
> + if idx is not None and idx >= 0 and idx < len(g.cf.images):
> sel = idx
>
> if sel == -1:
next prev parent reply other threads:[~2013-01-10 8:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-09 13:29 [PATCH] Fix pygrub handling non-default entry Miroslav Rezanina
2013-01-10 8:36 ` Matt Wilson [this message]
2013-01-17 13:53 ` Ian Campbell
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=20130110083617.GA6316@u109add4315675089e695.ant.amazon.com \
--to=msw@amazon.com \
--cc=mrezanin@redhat.com \
--cc=xen-devel@lists.xen.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).