|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-changelog
[Xen-changelog] [xen-unstable] libxl: notice if vbd virt device	specifie
 
# 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 <=
  
 |  
  
 | 
    | 
  
  
    |   | 
    |