From 6a64b644ac593aca3762644b9585033d7cac0a29 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Wed, 21 Jan 2015 10:14:47 +0000 Subject: savevm: Convert fprintf to error_report Convert a bunch of fprintfs to error_reports Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Amit Shah Signed-off-by: Juan Quintela --- migration/vmstate.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'migration') diff --git a/migration/vmstate.c b/migration/vmstate.c index 3dde574c0f..2c0b13502c 100644 --- a/migration/vmstate.c +++ b/migration/vmstate.c @@ -3,6 +3,7 @@ #include "migration/qemu-file.h" #include "migration/vmstate.h" #include "qemu/bitops.h" +#include "qemu/error-report.h" #include "trace.h" static void vmstate_subsection_save(QEMUFile *f, const VMStateDescription *vmsd, @@ -122,8 +123,8 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd, } } } else if (field->flags & VMS_MUST_EXIST) { - fprintf(stderr, "Input validation failed: %s/%s\n", - vmsd->name, field->name); + error_report("Input validation failed: %s/%s", + vmsd->name, field->name); return -1; } field++; @@ -167,7 +168,7 @@ void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd, } } else { if (field->flags & VMS_MUST_EXIST) { - fprintf(stderr, "Output state validation failed: %s/%s\n", + error_report("Output state validation failed: %s/%s", vmsd->name, field->name); assert(!(field->flags & VMS_MUST_EXIST)); } -- cgit v1.2.3