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-devel

[Xen-devel] [PATCH 1/2] libxl: notice if vbd virt device specifier ("pat

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1/2] libxl: notice if vbd virt device specifier ("path") unrecognised
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Thu, 4 Feb 2010 16:41:48 +0000
Delivery-date: Thu, 04 Feb 2010 08:42:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
These two patches fix some bugs in vbd name parsing in libxl.

# HG changeset patch
# User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1265294451 0
# Node ID 5d65c6b5a32e712dea1eea182acb2ddc1e0c7a43
# Parent  eeb1608760ff58cb63a9c467b26d5e66e6dea10f
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>

diff -r eeb1608760ff -r 5d65c6b5a32e tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Thu Feb 04 12:02:34 2010 +0000
+++ b/tools/libxl/libxl.c       Thu Feb 04 14:40:51 2010 +0000
@@ -1112,6 +1112,11 @@
 
     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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>