mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
Fixed virsh command line arg handling for -t option
This commit is contained in:
parent
02a271f220
commit
a0d210598f
1
AUTHORS
1
AUTHORS
@ -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....]
|
||||
|
||||
|
@ -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
|
||||
|
14
src/virsh.c
14
src/virsh.c
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user