On Wed, Sep 21, 2011 at 06:28:26AM -0600, Eric Blake wrote: > On 09/21/2011 06:18 AM, Jason Krieg wrote: > >Hi, > > > >the virsh qemu-monitor-command is not working with libvirt 0.9.5 > > > >with git commit 85d2810823a31634b12145d6c196930b40425370 > > > >*opts_seen moved into the != VSH_OT_ARGV if statement > > > >so now opts_seen is only set if not VSH_OT_ARGV > > > > > > > > >diff -Nurp libvirt-0.9.5/tools/virsh.c libvirt-0.9.5.new/tools/virsh.c > >--- libvirt-0.9.5/tools/virsh.c 2011-09-20 05:00:45.000000000 +0200 > >+++ libvirt-0.9.5.new/tools/virsh.c 2011-09-21 13:56:17.000000000 +0200 > >@@ -13916,8 +13916,8 @@ vshCmddefGetData(const vshCmdDef *cmd, u > > opt =&cmd->opts[i]; > > if (opt->type != VSH_OT_ARGV) { > > *opts_need_arg&= ~(1<< i); > >- *opts_seen |= 1<< i; > > } > >+ *opts_seen |= 1<< i; > > return opt; > > Thanks for the report, but reverting this change would break > snapshot-create-as diskspec parsing. > > I'll have to come up with a proper fix that works with both commands. Hands up who wants to pull all this dodgy ARGV parsing code out of virsh, and into a isolated src/util/cliparse.c module, where it can be properly unit tested without involving the rest of the virsh code... Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list