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-unstable] Do an explicit check for bootloader path

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Do an explicit check for bootloader path existence prior
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 08 Dec 2006 13:20:28 +0000
Delivery-date: Fri, 08 Dec 2006 05:21:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 531c67ed64f4937e8351ee4e90f2b8d507d63b14
# Parent  c287052a0a654a74153f176fbd8159cb1d75211b
Do an explicit check for bootloader path existence prior
to the one for executable permissions. Also print out the path being
tested.

Signed-off-by: Daniel P, Berrange <berrange@xxxxxxxxxx>
---
 tools/python/xen/xm/create.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r c287052a0a65 -r 531c67ed64f4 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Thu Dec 07 12:07:53 2006 +0000
+++ b/tools/python/xen/xm/create.py     Thu Dec 07 12:11:40 2006 +0000
@@ -704,8 +704,10 @@ def configure_hvm(config_image, vals):
     config_image.append(['vncpasswd', vals.vncpasswd])
 
 def run_bootloader(vals, config_image):
+    if not os.access(vals.bootloader, os.F_OK):
+        err("Bootloader '%s' does not exist" % vals.bootloader)
     if not os.access(vals.bootloader, os.X_OK):
-        err("Bootloader isn't executable")
+        err("Bootloader '%s' isn't executable" % vals.bootloader)
     if len(vals.disk) < 1:
         err("No disks configured and boot loader requested")
     (uname, dev, mode, backend) = vals.disk[0]

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Do an explicit check for bootloader path existence prior, Xen patchbot-unstable <=