提交 54086fe5 编写于 作者: G Gonglei 提交者: Gerd Hoffmann

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: NGonglei <arei.gonglei@huawei.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 4aca8a81
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册