summaryrefslogtreecommitdiffstats
path: root/softmmu
diff options
context:
space:
mode:
authorMarc-André Lureau2022-08-22 15:10:21 +0200
committerMarc-André Lureau2022-09-02 13:54:47 +0200
commit0f957c53c84d655f2e99677d407cf2bbe1832de4 (patch)
tree644d6e9bd8e40a4a2a345245ff1bdc17c0e3681e /softmmu
parenttests/unit: Update test-io-channel-socket.c for Windows (diff)
downloadqemu-0f957c53c84d655f2e99677d407cf2bbe1832de4.tar.gz
qemu-0f957c53c84d655f2e99677d407cf2bbe1832de4.tar.xz
qemu-0f957c53c84d655f2e99677d407cf2bbe1832de4.zip
audio: exit(1) if audio backend failed to be found or initialized
If you specify a known backend but it isn't compiled in, or failed to initialize, you get a simple warning and the "none" backend as a fallback, and QEMU runs happily: $ qemu-system-x86_64 -audiodev id=audio,driver=dsound audio: Unknown audio driver `dsound' audio: warning: Using timer based audio emulation ... Instead, QEMU should fail to start: $ qemu-system-x86_64 -audiodev id=audio,driver=dsound audio: Unknown audio driver `dsound' $ Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1983493 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20220822131021.975656-1-marcandre.lureau@redhat.com>
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/vl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 706bd7cff7..dea4005e47 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -1885,7 +1885,9 @@ static void qemu_create_early_backends(void)
* setting machine properties, so they can be referred to.
*/
configure_blockdev(&bdo_queue, machine_class, snapshot);
- audio_init_audiodevs();
+ if (!audio_init_audiodevs()) {
+ exit(1);
+ }
}