aboutsummaryrefslogtreecommitdiff
path: root/hw/audio
diff options
context:
space:
mode:
authorTudor Gheorghiu <tudor.reda@gmail.com>2024-10-08 01:27:56 +0300
committerMichael Tokarev <mjt@tls.msk.ru>2024-10-21 22:40:47 +0300
commit5ae3ec63631a907ba474094df99594cd545590df (patch)
treef8c278bfd0205d204114768d0b160060fd9266a7 /hw/audio
parentf8d3116fddcea844a086f879e6e934107f471b10 (diff)
downloadqemu-5ae3ec63631a907ba474094df99594cd545590df.zip
qemu-5ae3ec63631a907ba474094df99594cd545590df.tar.gz
qemu-5ae3ec63631a907ba474094df99594cd545590df.tar.bz2
replace error_setg(&error_fatal, ...) with error_report()
According to include/qapi/error.h: * Please don't error_setg(&error_fatal, ...), use error_report() and * exit(), because that's more obvious. Patch updates all instances of error_setg(&error_fatal, ...) with error_report(...), adds the explicit exit(1) and removes redundant return statements. Signed-off-by: Tudor Gheorghiu <tudor.reda@gmail.com> Suggested-by: Thomas Huth <thuth@redhat.com> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2587 Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> (Mjt: also fold __func__ to previous line)
Diffstat (limited to 'hw/audio')
-rw-r--r--hw/audio/soundhw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/audio/soundhw.c b/hw/audio/soundhw.c
index b387b0e..d18fd9f 100644
--- a/hw/audio/soundhw.c
+++ b/hw/audio/soundhw.c
@@ -88,7 +88,8 @@ void select_soundhw(const char *name, const char *audiodev)
struct soundhw *c;
if (selected) {
- error_setg(&error_fatal, "only one -soundhw option is allowed");
+ error_report("only one -soundhw option is allowed");
+ exit(1);
}
for (c = soundhw; c->name; ++c) {