mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
migration: introduce a delete_snapshot wrapper
Make snapshot deletion consistent with the snapshot save and load commands by using a wrapper around the blockdev layer. The main difference is that we get upfront validation of the passed in device list (if any). Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20210204124834.774401-10-berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
f1a9fcdd01
commit
bef7e9e2c7
3 changed files with 28 additions and 1 deletions
|
@ -48,4 +48,17 @@ bool load_snapshot(const char *name,
|
|||
bool has_devices, strList *devices,
|
||||
Error **errp);
|
||||
|
||||
/**
|
||||
* delete_snapshot: Delete a snapshot.
|
||||
* @name: path to snapshot
|
||||
* @has_devices: whether to use explicit device list
|
||||
* @devices: explicit device list to snapshot
|
||||
* @errp: pointer to error object
|
||||
* On success, return %true.
|
||||
* On failure, store an error through @errp and return %false.
|
||||
*/
|
||||
bool delete_snapshot(const char *name,
|
||||
bool has_devices, strList *devices,
|
||||
Error **errp);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue