[PATCH 099/103] qemuBuildSoundCommandLine: Generate via JSON

Ján Tomko jtomko at redhat.com
Mon Oct 11 16:17:33 UTC 2021


On a Thursday in 2021, Peter Krempa wrote:
>The sound devices have only the 'audiodev' property which is a string.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_command.c | 40 +++++++++++++++++++++++-----------------
> 1 file changed, 23 insertions(+), 17 deletions(-)
>
>diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
>index 324da4adc5..cf56ec3a76 100644
>--- a/src/qemu/qemu_command.c
>+++ b/src/qemu/qemu_command.c
>@@ -4447,15 +4447,16 @@ qemuGetAudioIDString(const virDomainDef *def, int id)
[..]

>+    g_autofree char *audioid = NULL;
>
>-    /* Hack for devices with different names in QEMU and libvirt */

Nice, you also got rid of the hack.

>     switch (sound->model) {
>     case VIR_DOMAIN_SOUND_MODEL_ES1370:
>         model = "ES1370";
>@@ -4478,21 +4479,29 @@ qemuBuildSoundDevStr(const virDomainDef *def,
>     case VIR_DOMAIN_SOUND_MODEL_PCSPK: /* pc-speaker is handled separately */
>     case VIR_DOMAIN_SOUND_MODEL_ICH7:
>     case VIR_DOMAIN_SOUND_MODEL_LAST:
>-        return NULL;
>+        return -1;
>     }
>

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: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20211011/0cbd3c51/attachment-0001.sig>


More information about the libvir-list mailing list