mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
savevm: Convert fprintf to error_report
Convert a bunch of fprintfs to error_reports Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
027f15696d
commit
6a64b644ac
2 changed files with 15 additions and 13 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue