[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] tools/pygrub: fix solaris kernel sniff


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
  • Date: Mon, 09 Jul 2012 15:33:08 +0000
  • Delivery-date: Mon, 09 Jul 2012 15:33:16 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
# Date 1341825555 -3600
# Node ID e8a3797e34d1b6b13cd5547e43afe08ef7d95cb1
# Parent  3fed2c0a282acbca71d72e89c1d067f4f8c951e9
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>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
xen-unstable changeset:   23686:7c39a2c0d870
xen-unstable date:        Thu Jul 14 18:09:58 2011 +0100
---


diff -r 3fed2c0a282a -r e8a3797e34d1 tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub   Tue Jul 03 13:50:01 2012 +0100
+++ b/tools/pygrub/src/pygrub   Mon Jul 09 10:19:15 2012 +0100
@@ -604,7 +604,8 @@ 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"):
+    if not fs.file_exists("/platform/i86xpv/kernel/unix") and \
+       not fs.file_exists("/platform/i86xpv/kernel/amd64/unix"):
         return cfg
 
     if not cfg["kernel"]:
@@ -612,9 +613,11 @@ def sniff_solaris(fs, cfg):
           fs.file_exists("/platform/i86xpv/kernel/amd64/unix"):
             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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.