]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fixed virsh command line arg handling for -t option
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 27 Feb 2007 15:32:18 +0000 (15:32 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 27 Feb 2007 15:32:18 +0000 (15:32 +0000)
AUTHORS
ChangeLog
src/virsh.c

diff --git a/AUTHORS b/AUTHORS
index ad57eec583e8513fe1442fbb216f8180d597fbf4..96dfde240eb4dd98d283d79076c4ae419b81b009 100644 (file)
--- a/AUTHORS
+++ b/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....]
 
index 1aa32415715f0812b343e5eb508ce8d539460028..535b59327c61d3cf85cad82d480a38be9420d481 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index f232d8ead4ea8081b16d2658342ceb80959185d0..6274108887cfc6c60a9998d9f0985508ca8a008c 100644 (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) {