debuggers.hg

changeset 22237:968ac95c960f

xl: fix off-by-one mistake in block-attach handler

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Jan Beulich <jbeulich@novell.com>
date Tue Sep 21 17:39:03 2010 +0100 (2010-09-21)
parents 206e25c65694
children a2b46be9958e
files tools/libxl/xl_cmdimpl.c
line diff
     1.1 --- a/tools/libxl/xl_cmdimpl.c	Tue Sep 21 16:41:09 2010 +0100
     1.2 +++ b/tools/libxl/xl_cmdimpl.c	Tue Sep 21 17:39:03 2010 +0100
     1.3 @@ -4282,7 +4282,7 @@ int main_blockattach(int argc, char **ar
     1.4      }
     1.5      disk.virtpath = argv[optind+2];
     1.6      disk.unpluggable = 1;
     1.7 -    disk.readwrite = ((argc-optind <= 2) || (argv[optind+3][0] == 'w'));
     1.8 +    disk.readwrite = ((argc-optind <= 3) || (argv[optind+3][0] == 'w'));
     1.9  
    1.10      if (domain_qualifier_to_domid(argv[optind], &fe_domid, 0) < 0) {
    1.11          fprintf(stderr, "%s is an invalid domain identifier\n", argv[optind]);