[libvirt] [REPOST PATCH v6 4/8] qemu: Refactor qemuBuildSCSIiSCSIHostdevDrvStr slightly

Peter Krempa pkrempa at redhat.com
Thu Nov 23 10:32:43 UTC 2017


On Wed, Nov 08, 2017 at 08:15:57 -0500, John Ferlan wrote:
> Rather than building the "file" string in qemuBuildSCSIHostdevDrvStr
> build it in the called helper.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/qemu/qemu_command.c | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)

[...]

> @@ -4956,7 +4963,7 @@ qemuBuildSCSIHostdevDrvStr(virDomainHostdevDefPtr dev)
>      if (scsisrc->protocol == VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI) {
>          if (!(source = qemuBuildSCSIiSCSIHostdevDrvStr(dev)))
>              goto error;
> -        virBufferAsprintf(&buf, "file=%s,if=none,format=raw", source);
> +        virBufferAsprintf(&buf, "%s", source);

You should use 'virBufferAdd' since this is not doing any formatting.

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20171123/4b489b95/attachment-0001.sig>


More information about the libvir-list mailing list