aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-10-07 16:00:38 +0800
committerGerd Hoffmann <kraxel@redhat.com>2014-10-15 10:46:01 +0200
commit54086fe5d2c562a3173126d9991bd064faf1e884 (patch)
treed511bcd8dedf0f174c3eff61ecf4d49383b82d60
parent4aca8a817813f44e379d21b471c1d4136804814d (diff)
downloadqemu-54086fe5d2c562a3173126d9991bd064faf1e884.zip
qemu-54086fe5d2c562a3173126d9991bd064faf1e884.tar.gz
qemu-54086fe5d2c562a3173126d9991bd064faf1e884.tar.bz2
bootindex: change fprintf to error_report
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>
-rw-r--r--bootdevice.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bootdevice.c b/bootdevice.c
index 56b1952..b29970c 100644
--- a/bootdevice.c
+++ b/bootdevice.c
@@ -24,6 +24,7 @@
#include "sysemu/sysemu.h"
#include "qapi/visitor.h"
+#include "qemu/error-report.h"
typedef struct FWBootEntry FWBootEntry;
@@ -93,7 +94,7 @@ void add_boot_device_path(int32_t bootindex, DeviceState *dev,
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;