aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-09-18 15:14:47 +0200
committerKevin Wolf <kwolf@redhat.com>2013-10-11 16:50:01 +0200
commit2d246f01d374c1a10c48c45aa931aa18f0a56634 (patch)
tree05ab336e82b1862554ad1ddfdf7f699ed0b67f4c /include/sysemu
parent622f557f5aaea1326c94ca4cddfa4eafeade3723 (diff)
downloadqemu-2d246f01d374c1a10c48c45aa931aa18f0a56634.zip
qemu-2d246f01d374c1a10c48c45aa931aa18f0a56634.tar.gz
qemu-2d246f01d374c1a10c48c45aa931aa18f0a56634.tar.bz2
blockdev: Introduce DriveInfo.enable_auto_del
BlockDriverStates shouldn't be affected by an unplugged guest device, except if created with the legacy -drive command line option or the drive_add HMP command. Make the automatic deletion as well as cancelling of jobs conditional on an enable_auto_del boolean that is only set in drive_init(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/blockdev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index 804ec88..1082091 100644
--- a/include/sysemu/blockdev.h
+++ b/include/sysemu/blockdev.h
@@ -37,6 +37,7 @@ struct DriveInfo {
int bus;
int unit;
int auto_del; /* see blockdev_mark_auto_del() */
+ bool enable_auto_del; /* Only for legacy drive_init() */
int media_cd;
int cyls, heads, secs, trans;
QemuOpts *opts;