Am 24.04.2013 um 17:32 hat Pavel Hrdina geschrieben: > Signed-off-by: Pavel Hrdina <phrd...@redhat.com> > --- > include/sysemu/sysemu.h | 2 +- > migration.c | 11 ++++++--- > savevm.c | 65 > ++++++++++++++++++++++++------------------------- > 3 files changed, 40 insertions(+), 38 deletions(-)
> @@ -2212,8 +2216,8 @@ int qemu_loadvm_state(QEMUFile *f) > > ret = vmstate_load(f, le->se, le->version_id); > if (ret < 0) { > - fprintf(stderr, "qemu: warning: error while loading state > for instance 0x%x of device '%s'\n", > - instance_id, idstr); > + error_setg(errp, "Error while loading state for instance " > + "0x%x of device '%s'", instance_id, idstr); error_setg_errno? > goto out; > } > break; > @@ -2227,40 +2231,35 @@ int qemu_loadvm_state(QEMUFile *f) > } > } > if (le == NULL) { > - fprintf(stderr, "Unknown savevm section %d\n", section_id); > - ret = -EINVAL; > + error_setg(errp, "Unknown vmstate section %d", section_id); > goto out; > } > > ret = vmstate_load(f, le->se, le->version_id); > if (ret < 0) { > - fprintf(stderr, "qemu: warning: error while loading state > section id %d\n", > + error_setg(errp, "Error while loading state section id %d", > section_id); Here, too. > goto out; > } > break; > default: > - fprintf(stderr, "Unknown savevm section type %d\n", > section_type); > - ret = -EINVAL; > + error_setg(errp, "Unknown vmstate section type %d", > section_type); > goto out; > } > } Kevin