Fixed virsh command line arg handling for -t option

This commit is contained in:
Daniel P. Berrange 2007-02-27 15:32:18 +00:00
parent 02a271f220
commit a0d210598f
3 changed files with 14 additions and 6 deletions

View File

@ -28,6 +28,7 @@ Patches have also been contributed by:
Richard W.M. Jones <rjones@redhat.com>
Atsushi SAKAI <sakaia@jp.fujitsu.com>
Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
Saori Fukuta <fukuta.saori@jp.fujitsu.com>
[....send patches to get your name here....]

View File

@ -1,3 +1,8 @@
Tue Feb 27 10:25:35 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/virsh.c: Fix command line argument parsing to make
the '-t' argument work. Signed-off-by: Saori Fukuta
Tue Feb 27 10:20:43 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/xend_internal.c: Only hardcode port = 5900+domid if

View File

@ -3344,12 +3344,14 @@ vshParseArgv(vshControl * ctl, int argc, char **argv)
int sz = strlen(last);
for (o = opt; o->name; o++) {
if (sz == 2 && *(last + 1) == o->val)
/* valid virsh short option */
valid = TRUE;
else if (sz > 2 && strcmp(o->name, last + 2) == 0)
/* valid virsh long option */
valid = TRUE;
if (o->has_arg == 1){
if (sz == 2 && *(last + 1) == o->val)
/* valid virsh short option */
valid = TRUE;
else if (sz > 2 && strcmp(o->name, last + 2) == 0)
/* valid virsh long option */
valid = TRUE;
}
}
}
if (!valid) {