[libvirt] [RFC PATCH 3/5] qemu: driver: Remove support for native->XML conversion

Ján Tomko jtomko at redhat.com
Fri Jun 14 13:51:31 UTC 2019


On Fri, Jun 14, 2019 at 03:30:25PM +0200, Peter Krempa wrote:
>This code is really neglected and does not at all work reliably. It
>can't even be used for converting our own commandline back.
>
>Since this was mostly useful for aiding migration from manually run qemu
>to libvirt and will not work for this puspose in many cases it's not

s/puspose/purpose/

>worth having in my opinion.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_driver.c | 38 ++++++--------------------------------
> 1 file changed, 6 insertions(+), 32 deletions(-)
>
>diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>index bb6ba97c7a..7279b20d2e 100644
>--- a/src/qemu/qemu_driver.c
>+++ b/src/qemu/qemu_driver.c
>@@ -7319,44 +7319,18 @@ static char
>
>
> static char *qemuConnectDomainXMLFromNative(virConnectPtr conn,
>-                                            const char *format,
>-                                            const char *config,
>+                                            const char *format ATTRIBUTE_UNUSED,
>+                                            const char *config ATTRIBUTE_UNUSED,
>                                             unsigned int flags)
> {
>-    virQEMUDriverPtr driver = conn->privateData;
>-    virDomainDefPtr def = NULL;
>-    char *xml = NULL;
>-    virCapsPtr caps = NULL;
>-
>     virCheckFlags(0, NULL);
>
>     if (virConnectDomainXMLFromNativeEnsureACL(conn) < 0)
>-        goto cleanup;

I don't see a benefit in checking ACLs to report an error.
Either way, it should be handled consistently - you removed the check
from qemuDomainQemuAttach.

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


More information about the libvir-list mailing list