aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2010-07-30 21:12:24 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-07-30 21:12:24 +0200
commitcdc6f542007a6aee0b18a5d616d031c750691e7a (patch)
treec14a02f6cdb227350b9f173fb36b78358cca5421 /blockdev.c
parent18e9ea8a3f36b0a3845e1ac6d8acd180063bed8f (diff)
parent199630b62ec7cc5efd6f860ff545b449c7b5cdb8 (diff)
downloadqemu-cdc6f542007a6aee0b18a5d616d031c750691e7a.zip
qemu-cdc6f542007a6aee0b18a5d616d031c750691e7a.tar.gz
qemu-cdc6f542007a6aee0b18a5d616d031c750691e7a.tar.bz2
Merge branch 'for-anthony' of git://repo.or.cz/qemu/kevin
* 'for-anthony' of git://repo.or.cz/qemu/kevin: Fix -snapshot deleting images on disk change block: Use error codes from lower levels for error message block: default to 0 minimal / optiomal I/O size move 'unsafe' to end of caching modes in help virtio-blk: Create exit function to unregister savevm block migration: propagate return value when bdrv_write() returns < 0 ide/atapi: add support for GET EVENT STATUS NOTIFICATION
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c
index 0a9dec3..01e402b 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -590,6 +590,7 @@ int do_change_block(Monitor *mon, const char *device,
return -1;
}
bdrv_flags = bdrv_is_read_only(bs) ? 0 : BDRV_O_RDWR;
+ bdrv_flags |= bdrv_is_snapshot(bs) ? BDRV_O_SNAPSHOT : 0;
if (bdrv_open(bs, filename, bdrv_flags, drv) < 0) {
qerror_report(QERR_OPEN_FILE_FAILED, filename);
return -1;