aboutsummaryrefslogtreecommitdiffstats
path: root/block_int.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-08-03 15:07:41 +0200
committerKevin Wolf <kwolf@redhat.com>2011-09-06 11:23:51 +0200
commit0e49de5232f47c9e58adb82c28d4f42be933d891 (patch)
treec0204e2cf08f38a843060372a4165d89ca38de61 /block_int.h
parentfa879d62eb51253d00b6920ce1d1d9d261370a49 (diff)
block: Generalize change_cb() to BlockDevOps
So we can more easily add device model callbacks. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block_int.h')
-rw-r--r--block_int.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/block_int.h b/block_int.h
index adc26f815..ab31dc99e 100644
--- a/block_int.h
+++ b/block_int.h
@@ -161,15 +161,14 @@ struct BlockDriverState {
int encrypted; /* if true, the media is encrypted */
int valid_key; /* if true, a valid encryption key has been set */
int sg; /* if true, the device is a /dev/sg* */
- /* event callback when inserting/removing */
- void (*change_cb)(void *opaque, int reason);
- void *change_opaque;
BlockDriver *drv; /* NULL means no media */
void *opaque;
void *dev; /* attached device model, if any */
/* TODO change to DeviceState when all users are qdevified */
+ const BlockDevOps *dev_ops;
+ void *dev_opaque;
char filename[1024];
char backing_file[1024]; /* if non zero, the image is a diff of