X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=savevm.c;h=2f631d4045cd45ce03b639897dafe459cf3cafd9;hb=d48adddac7d1839c8d734506aba6fd39fb9c3834;hp=4a3c819fcdda5a4ded652c510f6178a03f9324d9;hpb=3e4be9c29784df09c364b52a55e826a0b05b950e;p=qemu.git diff --git a/savevm.c b/savevm.c index 4a3c819fc..2f631d404 100644 --- a/savevm.c +++ b/savevm.c @@ -566,6 +566,13 @@ QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops) return f; } +/* + * Get last error for stream f + * + * Return negative error value if there has been an error on previous + * operations, return 0 if no error happened. + * + */ int qemu_file_get_error(QEMUFile *f) { return f->last_error; @@ -642,7 +649,7 @@ void ram_control_after_iterate(QEMUFile *f, uint64_t flags) void ram_control_load_hook(QEMUFile *f, uint64_t flags) { - int ret = 0; + int ret = -EINVAL; if (f->ops->hook_ram_load) { ret = f->ops->hook_ram_load(f, f->opaque, flags);