]> git.ipfire.org Git - thirdparty/libvirt.git/commit
node_device_udev: handle move events
authorMark Asselstine <mark.asselstine@windriver.com>
Thu, 16 Apr 2020 15:57:45 +0000 (11:57 -0400)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 20 Apr 2020 13:25:52 +0000 (15:25 +0200)
commitabbd3a3184657fd6aeb43aab4bc90d98e59c0319
tree404691f30f89cb5f8ac3749064f1d7d710c179de
parenta7f0a3a272a847fef76950a173945fc9ad83f574
node_device_udev: handle move events

It is possible and common to rename some devices, this is especially
true for ethernet devices such as veth pairs.

In the udevEventHandleThread() we will be notified of this change but
currently we only process "add", "change" and "remove"
events. Renaming a device such as above results in a "move" event, not
a "remove" followed by and "add" or vise versa. This change will add
the new/destination device to our records but unfortunately there is
no usable mechanism to identify the old/source device to remove it
from the records. So this is admittedly only a partial fix.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/node_device/node_device_udev.c