]> git.proxmox.com Git - mirror_qemu.git/commitdiff
bootindex: change fprintf to error_report
authorGonglei <arei.gonglei@huawei.com>
Tue, 7 Oct 2014 08:00:38 +0000 (16:00 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 15 Oct 2014 08:46:01 +0000 (10:46 +0200)
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>
bootdevice.c

index 56b19529b1bcb3c8f857cb1f22fc4bcb7d8415ae..b29970c7a35eef4922ce6c89c5eed077645fe35d 100644 (file)
@@ -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;