提交 a0d21059 编写于 作者: D Daniel P. Berrange

Fixed virsh command line arg handling for -t option

上级 02a271f2
......@@ -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....]
......
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
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册