diff --git a/savevm.c b/savevm.c index 2ce439f7f4533b7ae916d1d84edeb93a0f5592df..ff5ece651adfd981174561ca46a565c80a9f2d43 100644 --- a/savevm.c +++ b/savevm.c @@ -2410,7 +2410,7 @@ void qmp_xen_save_devices_state(const char *filename, Error **errp) f = qemu_fopen(filename, "wb"); if (!f) { - error_set(errp, QERR_OPEN_FILE_FAILED, filename); + error_setg_file_open(errp, errno, filename); goto the_end; } ret = qemu_save_device_state(f);