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] libxl: notice if vbd virt device specifie

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: notice if vbd virt device specifier ("path") unrecognised
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 08 Feb 2010 00:55:09 -0800
Delivery-date: Mon, 08 Feb 2010 00:55:05 -0800
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 1265366157 0
# Node ID 503b47f53b53ab057d4186a29f6411ed612494ba
# Parent  7b751b0e6f1bc7485b0718e634ed7cb9ce9ab68c
libxl: notice if vbd virt device specifier ("path") unrecognised

Previously, specifying a virtual device string the vbd that couldn't
be parsed would result in attempting to actually create the device
with vbd number -1 !

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c |    5 +++++
 1 files changed, 5 insertions(+)

diff -r 7b751b0e6f1b -r 503b47f53b53 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Thu Feb 04 19:40:19 2010 +0000
+++ b/tools/libxl/libxl.c       Fri Feb 05 10:35:57 2010 +0000
@@ -1112,6 +1112,11 @@ int libxl_device_disk_add(struct libxl_c
 
     backend_type = device_disk_backend_type_of_phystype(disk->phystype);
     devid = device_disk_dev_number(disk->virtpath);
+    if (devid==-1) {
+        XL_LOG(ctx, XL_LOG_ERROR, "Invalid or unuspported"
+               " virtual disk identifier %s", disk->virtpath);
+        return ERROR_INVAL;
+    }
 
     device.backend_devid = devid;
     device.backend_domid = disk->backend_domid;

_______________________________________________
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] libxl: notice if vbd virt device specifier ("path") unrecognised, Xen patchbot-unstable <=