[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.