xcp-1.6-updates/xen-4.1.hg

changeset 23311:e8a3797e34d1

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@oracle.com>
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Frank Che <frank.che@oracle.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset: 23686:7c39a2c0d870
xen-unstable date: Thu Jul 14 18:09:58 2011 +0100
author Zhigang Wang <zhigang.x.wang@oracle.com>
date Mon Jul 09 10:19:15 2012 +0100 (2012-07-09)
parents 3fed2c0a282a
children b394b1f87ebc
files tools/pygrub/src/pygrub
line diff
     1.1 --- a/tools/pygrub/src/pygrub	Tue Jul 03 13:50:01 2012 +0100
     1.2 +++ b/tools/pygrub/src/pygrub	Mon Jul 09 10:19:15 2012 +0100
     1.3 @@ -604,7 +604,8 @@ def supports64bitPVguest():
     1.4  # If nothing has been specified, look for a Solaris domU. If found, perform the
     1.5  # necessary tweaks.
     1.6  def sniff_solaris(fs, cfg):
     1.7 -    if not fs.file_exists("/platform/i86xpv/kernel/unix"):
     1.8 +    if not fs.file_exists("/platform/i86xpv/kernel/unix") and \
     1.9 +       not fs.file_exists("/platform/i86xpv/kernel/amd64/unix"):
    1.10          return cfg
    1.11  
    1.12      if not cfg["kernel"]:
    1.13 @@ -612,9 +613,11 @@ def sniff_solaris(fs, cfg):
    1.14            fs.file_exists("/platform/i86xpv/kernel/amd64/unix"):
    1.15              cfg["kernel"] = "/platform/i86xpv/kernel/amd64/unix"
    1.16              cfg["ramdisk"] = "/platform/i86pc/amd64/boot_archive"
    1.17 -        else:
    1.18 +        elif fs.file_exists("/platform/i86xpv/kernel/unix"):
    1.19              cfg["kernel"] = "/platform/i86xpv/kernel/unix"
    1.20              cfg["ramdisk"] = "/platform/i86pc/boot_archive"
    1.21 +        else:
    1.22 +            return cfg
    1.23  
    1.24      # Unpleasant. Typically we'll have 'root=foo -k' or 'root=foo /kernel -k',
    1.25      # and we need to maintain Xen properties (root= and ip=) and the kernel