The function may be called by qmp command, we should
report error message to the caller.
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
#include "sysemu/sysemu.h"
#include "qapi/visitor.h"
+#include "qemu/error-report.h"
typedef struct FWBootEntry FWBootEntry;
QTAILQ_FOREACH(i, &fw_boot_order, link) {
if (i->bootindex == bootindex) {
- fprintf(stderr, "Two devices with same boot index %d\n", bootindex);
+ error_report("Two devices with same boot index %d", bootindex);
exit(1);
} else if (i->bootindex < bootindex) {
continue;