WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.0-testing] xm: Do not check path of kernel if boo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] xm: Do not check path of kernel if bootloader is specified
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Jul 2010 06:07:14 -0700
Delivery-date: Fri, 16 Jul 2010 06:12:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1279285350 -3600
# Node ID 2e86f1e07b0ad2f9648c3e7598e42b67205d151d
# Parent  7154c8628c6736ef0ca836b2f6d9174d47076870
xm: Do not check path of kernel if bootloader is specified

When create DomU, if bootloader is specified, 'kernel/ramdisk' will be
used by bootloader when boots DomU. So it is needless to check the
path is existent or not.

Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
xen-unstable changeset:   21807:6fdb00dc93a5
xen-unstable date:        Thu Jul 15 16:32:50 2010 +0100
---
 tools/python/xen/xm/create.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff -r 7154c8628c67 -r 2e86f1e07b0a tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Fri Jul 16 14:02:10 2010 +0100
+++ b/tools/python/xen/xm/create.py     Fri Jul 16 14:02:30 2010 +0100
@@ -704,7 +704,12 @@ def configure_image(vals):
         return None
     config_image = [ vals.builder ]
     if vals.kernel:
-        if os.path.dirname(vals.kernel) != "" and os.path.exists(vals.kernel):
+        if vals.bootloader:
+            # If bootloader is specified, vals.kernel will be used
+            # by bootloader when boots DomU. So it is needless to
+            # check the path is existent or not.
+            config_image.append([ 'kernel', vals.kernel ])
+        elif os.path.dirname(vals.kernel) != "" and 
os.path.exists(vals.kernel):
             config_image.append([ 'kernel', vals.kernel ])
         elif vals.kernel == 'hvmloader':
             # Keep hvmloader w/o a path and let xend find it.
@@ -717,7 +722,10 @@ def configure_image(vals):
         else:
             raise ValueError('Cannot find kernel "%s"' % vals.kernel)
     if vals.ramdisk:
-        if os.path.dirname(vals.ramdisk) != "" and 
os.path.exists(vals.ramdisk):
+        if vals.bootloader:
+            # Same with 'kernel' above
+            config_image.append([ 'ramdisk', vals.ramdisk ])
+        elif os.path.dirname(vals.ramdisk) != "" and 
os.path.exists(vals.ramdisk):
             config_image.append([ 'ramdisk', vals.ramdisk ])
         elif os.path.exists(os.path.abspath(vals.ramdisk)):
             # Keep old behaviour, if path is valid.

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] xm: Do not check path of kernel if bootloader is specified, Xen patchbot-4.0-testing <=