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

[Xen-devel] [PATCH] xl: fix off-by-one mistake in block-attach handler



Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2010-09-20.orig/tools/libxl/xl_cmdimpl.c    2010-09-15 17:59:07.000000000 
+0200
+++ 2010-09-20/tools/libxl/xl_cmdimpl.c 2010-09-21 12:06:58.000000000 +0200
@@ -4280,7 +4280,7 @@ int main_blockattach(int argc, char **ar
     }
     disk.virtpath = argv[optind+2];
     disk.unpluggable = 1;
-    disk.readwrite = ((argc-optind <= 2) || (argv[optind+3][0] == 'w'));
+    disk.readwrite = ((argc-optind <= 3) || (argv[optind+3][0] == 'w'));
 
     if (domain_qualifier_to_domid(argv[optind], &fe_domid, 0) < 0) {
         fprintf(stderr, "%s is an invalid domain identifier\n", argv[optind]);



Attachment: xl-block-attach.patch
Description: Text document

_______________________________________________
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®.