]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: cmdEvent: Rewrite questionable event registration
authorPeter Krempa <pkrempa@redhat.com>
Mon, 21 Feb 2022 15:52:54 +0000 (16:52 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 3 Mar 2022 10:06:56 +0000 (11:06 +0100)
commitc6bb2746933bbe65877a5f8a8d60e100b0bf8a59
tree0fe4a61286724dfacbd2cdfb25050187ba4c6ef0
parentea3e64fefdfb2e02ff80e6d21e7e242a7551fdd7
virsh: cmdEvent: Rewrite questionable event registration

The code registering the event handlers in 'cmdEvent' had too many
blocks of code conditional on whether just one event is being listened
to or all events.

The code can be greatly simplified by uniting the code paths and having
only one branch when filling the list of events we want to listen for.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-domain-event.c