diff options
Diffstat (limited to 'migration')
-rw-r--r-- | migration/savevm.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/migration/savevm.c b/migration/savevm.c index 0b27a8c55a..0c5d61ae20 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -3071,6 +3071,20 @@ err_drain: return false; } +bool delete_snapshot(const char *name, bool has_devices, + strList *devices, Error **errp) +{ + if (!bdrv_all_can_snapshot(has_devices, devices, errp)) { + return false; + } + + if (bdrv_all_delete_snapshot(name, has_devices, devices, errp) < 0) { + return false; + } + + return true; +} + void vmstate_register_ram(MemoryRegion *mr, DeviceState *dev) { qemu_ram_set_idstr(mr->ram_block, |