diff --git a/configure b/configure index 72d1a94225..0918147156 100755 --- a/configure +++ b/configure @@ -2062,7 +2062,8 @@ chmod +x config.status rm -r "$TMPDIR1" if test "$rust" != disabled; then - echo '\nINFO: Rust bindings generation with `bindgen` might fail in some cases where' + echo + echo 'INFO: Rust bindings generation with `bindgen` might fail in some cases where' echo 'the detected `libclang` does not match the expected `clang` version/target. In' echo 'this case you must pass the path to `clang` and `libclang` to your build' echo 'command invocation using the environment variables CLANG_PATH and LIBCLANG_PATH' diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c index 9eb1aa7366..52327d9210 100644 --- a/hw/arm/allwinner-a10.c +++ b/hw/arm/allwinner-a10.c @@ -17,6 +17,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/error-report.h" #include "qemu/module.h" #include "hw/char/serial-mm.h" #include "hw/sysbus.h" @@ -50,9 +51,8 @@ void allwinner_a10_bootrom_setup(AwA10State *s, BlockBackend *blk) g_autofree uint8_t *buffer = g_new0(uint8_t, rom_size); if (blk_pread(blk, 8 * KiB, rom_size, buffer, 0) < 0) { - error_setg(&error_fatal, "%s: failed to read BlockBackend data", - __func__); - return; + error_report("%s: failed to read BlockBackend data", __func__); + exit(1); } rom_add_blob("allwinner-a10.bootrom", buffer, rom_size, diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c index 9bc57cd266..fd7638dbe8 100644 --- a/hw/arm/allwinner-h3.c +++ b/hw/arm/allwinner-h3.c @@ -182,9 +182,8 @@ void allwinner_h3_bootrom_setup(AwH3State *s, BlockBackend *blk) g_autofree uint8_t *buffer = g_new0(uint8_t, rom_size); if (blk_pread(blk, 8 * KiB, rom_size, buffer, 0) < 0) { - error_setg(&error_fatal, "%s: failed to read BlockBackend data", - __func__); - return; + error_report("%s: failed to read BlockBackend data", __func__); + exit(1); } rom_add_blob("allwinner-h3.bootrom", buffer, rom_size, diff --git a/hw/arm/allwinner-r40.c b/hw/arm/allwinner-r40.c index ced73009d6..c6f7cab1da 100644 --- a/hw/arm/allwinner-r40.c +++ b/hw/arm/allwinner-r40.c @@ -231,9 +231,8 @@ bool allwinner_r40_bootrom_setup(AwR40State *s, BlockBackend *blk, int unit) struct boot_file_head *head = (struct boot_file_head *)buffer; if (blk_pread(blk, 8 * KiB, rom_size, buffer, 0) < 0) { - error_setg(&error_fatal, "%s: failed to read BlockBackend data", - __func__); - return false; + error_report("%s: failed to read BlockBackend data", __func__); + exit(1); } /* we only check the magic string here. */ diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c index 962f98fee2..8b12d3e7cb 100644 --- a/hw/arm/xlnx-versal-virt.c +++ b/hw/arm/xlnx-versal-virt.c @@ -761,9 +761,9 @@ static void versal_virt_init(MachineState *machine) if (!flash_klass || object_class_is_abstract(flash_klass) || !object_class_dynamic_cast(flash_klass, TYPE_M25P80)) { - error_setg(&error_fatal, "'%s' is either abstract or" + error_report("'%s' is either abstract or" " not a subtype of m25p80", s->ospi_model); - return; + exit(1); } } diff --git a/hw/audio/soundhw.c b/hw/audio/soundhw.c index b387b0ef7d..d18fd9fa05 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) { diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1354e75694..d1b0f7c5bb 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -54,7 +54,6 @@ #include #include #include -//#include #include #include #include diff --git a/meson.build b/meson.build index d26690ce20..c26c417de1 100644 --- a/meson.build +++ b/meson.build @@ -1399,7 +1399,7 @@ iconv = not_found curses = not_found if have_system and get_option('curses').allowed() curses_test = ''' - #if defined(__APPLE__) || defined(__OpenBSD__) + #ifdef __APPLE__ #define _XOPEN_SOURCE_EXTENDED 1 #endif #include diff --git a/system/vl.c b/system/vl.c index e83b3b2608..d217b3d64d 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1841,7 +1841,8 @@ static void object_option_parse(const char *str) type = qemu_opt_get(opts, "qom-type"); if (!type) { - error_setg(&error_fatal, QERR_MISSING_PARAMETER, "qom-type"); + error_report(QERR_MISSING_PARAMETER, "qom-type"); + exit(1); } if (user_creatable_print_help(type, opts)) { exit(0); diff --git a/ui/console-vc.c b/ui/console-vc.c index 8393d532e7..53fcee88f4 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -648,7 +648,7 @@ static void vc_putchar(VCChardev *vc, int ch) QemuTextConsole *s = vc->console; int i; int x, y; - char response[40]; + g_autofree char *response = NULL; switch(vc->state) { case TTY_STATE_NORM: @@ -821,7 +821,7 @@ static void vc_putchar(VCChardev *vc, int ch) break; case 6: /* report cursor position */ - sprintf(response, "\033[%d;%dR", + response = g_strdup_printf("\033[%d;%dR", (s->y_base + s->y) % s->total_height + 1, s->x + 1); vc_respond_str(vc, response); diff --git a/ui/curses.c b/ui/curses.c index ec61615f7c..4d0be9b37d 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -38,7 +38,7 @@ #include "ui/input.h" #include "sysemu/sysemu.h" -#if defined(__APPLE__) || defined(__OpenBSD__) +#ifdef __APPLE__ #define _XOPEN_SOURCE_EXTENDED 1 #endif