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] tools/pygrub: fix solaris kernel sniff

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] tools/pygrub: fix solaris kernel sniff
From: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
Date: Fri, 08 Jul 2011 00:19:37 -0400
Cc: kurt.hackel@xxxxxxxxxx, zhigang.x.wang@xxxxxxxxxx, frank.che@xxxxxxxxxx
Delivery-date: Thu, 07 Jul 2011 21:21:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.8.4+40-99a7cd924636
# HG changeset patch
# User Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
# Date 1310098767 14400
# Node ID b579db4d7232b6541cdb1c5ed1dc01b41705d3d4
# Parent  2f63562df1c4230492a81793dce3672f93c93d9a
tools/pygrub: fix solaris kernel sniff

Solaris 11 build 163+ removes '/platform/i86xpv/kernel/unix' and only the
64-bit PV kernel file '/platform/i86xpv/kernel/amd64/unix' exists.

This patch fixes the detection.

Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
Signed-off-by: Kurt Hackel <kurt.hackel@xxxxxxxxxx>
Signed-off-by: Frank Che <frank.che@xxxxxxxxxx>

diff -r 2f63562df1c4 -r b579db4d7232 tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub   Mon Jun 27 17:37:12 2011 +0100
+++ b/tools/pygrub/src/pygrub   Fri Jul 08 00:19:27 2011 -0400
@@ -594,17 +594,16 @@ def supports64bitPVguest():
 # If nothing has been specified, look for a Solaris domU. If found, perform the
 # necessary tweaks.
 def sniff_solaris(fs, cfg):
-    if not fs.file_exists("/platform/i86xpv/kernel/unix"):
-        return cfg
     if not cfg["kernel"]:
         if supports64bitPVguest() and \
             cfg["kernel"] = "/platform/i86xpv/kernel/amd64/unix"
             cfg["ramdisk"] = "/platform/i86pc/amd64/boot_archive"
-        else:
+        elif fs.file_exists("/platform/i86xpv/kernel/unix"):
             cfg["kernel"] = "/platform/i86xpv/kernel/unix"
             cfg["ramdisk"] = "/platform/i86pc/boot_archive"
+        else:
+            return cfg
     # Unpleasant. Typically we'll have 'root=foo -k' or 'root=foo /kernel -k',
     # and we need to maintain Xen properties (root= and ip=) and the kernel

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>