]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Don't reuse variable in processSerialChangedEvent()
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 3 Aug 2023 06:52:57 +0000 (08:52 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 3 Aug 2023 14:35:29 +0000 (16:35 +0200)
commit5aba19868732e86e610d84e11d8adcbd1046d5b9
treec4e215831fb0c7f415491ab8bc3517ceb391d5c9
parent039b16e41ed1648646c4b35947428ba1b56d8e2a
qemu: Don't reuse variable in processSerialChangedEvent()

When a VSERPORT_CHANGE event is processed, we firstly do a little
detour and try to detect whether the event is coming from guest
agent. If so, we notify threads that are currently talking to the
agent about this fact. Then we proceed with usual event
processing (BeginJob(), update domain def, emit event, and so
on).

In both cases we use the same @dev variable to refer to domain
device. While this works, it will make writing semantic patch
unnecessary harder (see next commit(s)). Therefore, introduce a
separate variable for the detour code.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
src/qemu/qemu_driver.c