This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] [PATCH 1 of 5] pygrub: if default entry is "saved" then use

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1 of 5] pygrub: if default entry is "saved" then use first entry
From: ian.campbell@xxxxxxxxxx
Date: Sun, 22 Nov 2009 19:14:59 -0000
Delivery-date: Sun, 22 Nov 2009 11:15:38 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1258917298@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1258917298@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.3.1
# HG changeset patch
# User Ian Campbell <ijc@xxxxxxxxxxxxxx>
# Date 1258917181 0
# Node ID b50b4a265d3879f4c334361a433f4d23d5a65314
# Parent  32354b647470b843c18bd8261ab0b5f803a66289
pygrub: if default entry is "saved" then use first entry.

pygrub doesn't support the "savedefault" command and will error out if
menu.lst uses the "default saved" directive. We might as well start on
the first entry in this case instead of failing.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 32354b647470 -r b50b4a265d38 tools/pygrub/src/GrubConf.py
--- a/tools/pygrub/src/GrubConf.py      Sun Nov 22 19:13:01 2009 +0000
+++ b/tools/pygrub/src/GrubConf.py      Sun Nov 22 19:13:01 2009 +0000
@@ -258,7 +258,7 @@
         return self._default
     def _set_default(self, val):
         if val == "saved":
-            self._default = -1
+            self._default = 0
             self._default = int(val)

Xen-devel mailing list