libvirt/tools
Eric Blake 44fdfbb081 virsh: fix regression in 'virsh event' by domain
https://bugzilla.redhat.com/show_bug.cgi?id=1212620

Commit a0670ae caused a regression in 'virsh event' and
'virsh qemu-monitor-event' - if a user tries to filter the
command to a specific domain, an error message is printed:

$ virsh event dom --loop
error: internal error: virsh qemu-monitor-event: no domain VSH_OT_DATA option

and then the command continues as though no domain had been
supplied (giving events for ALL domains, instead of the
requested one).  This is because the code was incorrectly
assuming that all "domain" options would be supplied via a
mandatory VSH_OT_DATA, even though "domain" is optional for
these two commands, so we had changed them to VSH_OT_STRING
to quit failing for other reasons (ever since it was decided
that VSH_OT_DATA and VSH_OT_STRING should no longer be
synonyms).

In looking at the situation, though, the code for looking up
a domain was making a pointless check for whether the option
exists prior to finding the option's string value, as
vshCommandOptStringReq does just fine at reporting any errors
when looking up a string whether or not the option was present.

So this is a case of regression fixing by pure code deletion :)

* tools/virsh-domain.c (vshCommandOptDomainBy): Drop useless filter.
* tools/virsh-interface.c (vshCommandOptInterfaceBy): Likewise.
* tools/virsh-network.c (vshCommandOptNetworkBy): Likewise.
* tools/virsh-nwfilter.c (vshCommandOptNWFilterBy): Likewise.
* tools/virsh-secret.c (vshCommandOptSecret): Likewise.
* tools/virsh.h (vshCmdHasOption): Drop unused function.
* tools/virsh.c (vshCmdHasOption): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 31ef0836a7)
2015-04-16 13:54:49 -06:00
..
wireshark Remove unnecessary curly brackets in tools/ 2014-11-14 17:13:36 +01:00
libvirt_win_icon_16x16.ico
libvirt_win_icon_32x32.ico
libvirt_win_icon_48x48.ico
libvirt_win_icon_64x64.ico
libvirt-guests.init.in
libvirt-guests.service.in libvirt-guests: run after time-sync.target 2014-09-23 14:35:43 -06:00
libvirt-guests.sh.in libvirt-guests: Allow time sync on guests resume 2015-02-23 08:49:21 +01:00
libvirt-guests.sysconf libvirt-guests: Allow time sync on guests resume 2015-02-23 08:49:21 +01:00
Makefile.am conf: move storage source type to util/ 2014-04-01 10:38:14 -06:00
virsh_win_icon.rc
virsh-console.c Remove unnecessary curly brackets in tools/ 2014-11-14 17:13:36 +01:00
virsh-console.h
virsh-domain-monitor.c virsh: Emit error for VSH_OT_DATA without VSH_OFLAG_REQ 2015-01-12 13:38:42 +01:00
virsh-domain-monitor.h
virsh-domain.c virsh: fix regression in 'virsh event' by domain 2015-04-16 13:54:49 -06:00
virsh-domain.h virsh: domain: Split out code to lookup domain from string 2014-08-26 22:48:05 +02:00
virsh-edit.c virsh-edit: Make force editing usable 2015-02-20 07:46:54 +01:00
virsh-host.c Remove unnecessary curly brackets in tools/ 2014-11-14 17:13:36 +01:00
virsh-host.h
virsh-interface.c virsh: fix regression in 'virsh event' by domain 2015-04-16 13:54:49 -06:00
virsh-interface.h
virsh-network.c virsh: fix regression in 'virsh event' by domain 2015-04-16 13:54:49 -06:00
virsh-network.h
virsh-nodedev.c virsh-nodedev: Avoid spurious errors 2014-06-02 18:09:09 +02:00
virsh-nodedev.h
virsh-nwfilter.c virsh: fix regression in 'virsh event' by domain 2015-04-16 13:54:49 -06:00
virsh-nwfilter.h
virsh-pool.c virsh: Emit error for VSH_OT_DATA without VSH_OFLAG_REQ 2015-01-12 13:38:42 +01:00
virsh-pool.h
virsh-secret.c virsh: fix regression in 'virsh event' by domain 2015-04-16 13:54:49 -06:00
virsh-secret.h
virsh-snapshot.c virsh: Emit error for VSH_OT_DATA without VSH_OFLAG_REQ 2015-01-12 13:38:42 +01:00
virsh-snapshot.h
virsh-volume.c virsh-volume: add support for --reflink 2015-02-03 11:37:30 -05:00
virsh-volume.h
virsh.c virsh: fix regression in 'virsh event' by domain 2015-04-16 13:54:49 -06:00
virsh.h virsh: fix regression in 'virsh event' by domain 2015-04-16 13:54:49 -06:00
virsh.pod Clarify behavior or virDomainDetachDevice 2015-02-25 10:06:41 +01:00
virt-host-validate-common.c maint: avoid static zero init in tools 2014-10-29 09:55:09 -06:00
virt-host-validate-common.h maint: Prohibit "devname" by a syntax check rules 2014-10-01 16:39:01 +02:00
virt-host-validate-lxc.c
virt-host-validate-lxc.h
virt-host-validate-qemu.c
virt-host-validate-qemu.h
virt-host-validate.c
virt-login-shell.c Resolve Coverity CHECKED_RETURN 2014-09-15 10:44:27 -04:00
virt-login-shell.conf
virt-login-shell.pod
virt-pki-validate.in
virt-sanlock-cleanup.in
virt-xml-validate.in