[libvirt] [PATCH 04/34] qemu: domain: Replace qemuDomainObjPrivateXMLFormatNBDMigrationSource

Ján Tomko jtomko at redhat.com
Mon Mar 18 17:42:44 UTC 2019


On Mon, Mar 18, 2019 at 04:54:53PM +0100, Peter Krempa wrote:
>Use virDomainStorageSourceFormatFull which has the same functionality.
>

Not quite,

>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_domain.c | 43 ++++--------------------------------------
> 1 file changed, 4 insertions(+), 39 deletions(-)
>
>diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
>index d25d9ab666..78287b4d3e 100644
>--- a/src/qemu/qemu_domain.c
>+++ b/src/qemu/qemu_domain.c
>@@ -2341,47 +2341,11 @@ qemuDomainObjPrivateXMLFormatPR(virBufferPtr buf,
> }
>
>
>-static int
>-qemuDomainObjPrivateXMLFormatNBDMigrationSource(virBufferPtr buf,
>-                                                virStorageSourcePtr src)
>-{
>-    VIR_AUTOCLEAN(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
>-    VIR_AUTOCLEAN(virBuffer) childBuf = VIR_BUFFER_INITIALIZER;
>-    VIR_AUTOCLEAN(virBuffer) privateDataBuf = VIR_BUFFER_INITIALIZER;
>-    int ret = -1;
>-
>-    virBufferSetChildIndent(&childBuf, buf);
>-    virBufferSetChildIndent(&privateDataBuf, &childBuf);
>-
>-    virBufferAsprintf(&attrBuf, " type='%s' format='%s'",
>-                      virStorageTypeToString(src->type),
>-                      virStorageFileFormatTypeToString(src->format));
>-
>-    if (virDomainStorageSourceFormat(&attrBuf, &childBuf, src,
>-                                     VIR_DOMAIN_DEF_FORMAT_STATUS, true,
>-                                     false, 0, NULL) < 0)

the index attribute was not formatted here.
(It won't be formatted anyway because AFAIK it's always 0, but it's
worth mentioning in the commit message)

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: 488 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190318/3fb98532/attachment-0001.sig>


More information about the libvir-list mailing list