[PATCH 0/7] Sanitize logic to get live/config device definitions for unplug/update

Ján Tomko jtomko at redhat.com
Mon Dec 5 10:49:41 UTC 2022


On a Wednesday in 2022, Peter Krempa wrote:
>Convert code *DomainUpdateDeviceFlags/*DomainDetachDeviceLiveAndConfig
>to avoid use of virDomainDeviceDefCopy. We have the original XML string
>from the user so it doesn't make sense to parse it and then copy it
>(whcih involves formatting and parsing back), when we can simply parse
>it twice, saving the extra formatting step.
>
>Peter Krempa (7):
>  qemu: driver: Fix formatting of function headers around
>    qemuDomainAttachDevice
>  qemuDomainUpdateDeviceFlags: Parse XML twice rather than use
>    virDomainDeviceDefCopy
>  qemuDomainDetachDeviceLiveAndConfig: Parse XML twice rather than use
>    virDomainDeviceDefCopy
>  qemuDomainDetachDeviceLiveAndConfig: Refactor cleanup
>  lxcDomainAttachDeviceFlags: Parse XML twice rather than use
>    virDomainDeviceDefCopy
>  lxcDomainDetachDeviceFlags: Parse XML twice rather than use
>    virDomainDeviceDefCopy
>  conf: domain: Remove virDomainDeviceDefCopy
>
> src/conf/domain_conf.c   | 121 ---------------------------------------
> src/conf/domain_conf.h   |   4 --
> src/libvirt_private.syms |   1 -
> src/lxc/lxc_driver.c     |  75 ++++++++++--------------
> src/qemu/qemu_driver.c   |  97 +++++++++++++------------------
> 5 files changed, 70 insertions(+), 228 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20221205/3eec72d1/attachment.sig>


More information about the libvir-list mailing list