#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"
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,
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,
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. */
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);
}
}
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) {
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);