From 2d246f01d374c1a10c48c45aa931aa18f0a56634 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 18 Sep 2013 15:14:47 +0200 Subject: 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 Reviewed-by: Eric Blake Reviewed-by: Wenchao Xia --- include/sysemu/blockdev.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sysemu/blockdev.h') diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h index 804ec8839b..10820910d7 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; -- cgit v1.2.1