aboutsummaryrefslogtreecommitdiffstats
path: root/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'block.c')
-rw-r--r--block.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/block.c b/block.c
index 6d05a58..852cb3e 100644
--- a/block.c
+++ b/block.c
@@ -1181,6 +1181,15 @@ int bdrv_get_buffer(BlockDriverState *bs, uint8_t *buf, int64_t pos, int size)
/**************************************************************/
/* handling of snapshots */
+int bdrv_can_snapshot(BlockDriverState *bs)
+{
+ return ( bs &&
+ !bdrv_is_removable(bs) &&
+ !bdrv_is_read_only(bs) &&
+ bs->drv &&
+ bs->drv->bdrv_snapshot_create );
+}
+
int bdrv_snapshot_create(BlockDriverState *bs,
QEMUSnapshotInfo *sn_info)
{