mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
nodedev: fix mdev add udev event data handling
Two situations will trigger an udev add event: 1) the mdev is created when started (transient) or 2) the mdev was defined and is started In case 1 there is no node object existing and no config data is copied. In case 2 copying the active config data of an existing node object will only copy invalid data. Instead copying the defined config data will store valid data into the newly added node object. Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
This commit is contained in:
parent
e145d182a6
commit
7ccf76ea34
@ -1572,7 +1572,7 @@ udevAddOneDevice(struct udev_device *device)
|
||||
objdef = virNodeDeviceObjGetDef(obj);
|
||||
|
||||
if (is_mdev)
|
||||
nodeDeviceDefCopyFromMdevctl(def, objdef, false);
|
||||
nodeDeviceDefCopyFromMdevctl(def, objdef, true);
|
||||
|
||||
persistent = virNodeDeviceObjIsPersistent(obj);
|
||||
autostart = virNodeDeviceObjIsAutostart(obj);
|
||||
|
Loading…
Reference in New Issue
Block a user