From 7d4b4ba5c2bae99d44f265884b567ae63947bb4a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 6 Sep 2011 18:58:59 +0200 Subject: block: New change_media_cb() parameter load To let device models distinguish between eject and load. Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- block.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'block.h') diff --git a/block.h b/block.h index 4b7fa35c0e..16bfa0a3d6 100644 --- a/block.h +++ b/block.h @@ -32,11 +32,12 @@ typedef struct QEMUSnapshotInfo { typedef struct BlockDevOps { /* * Runs when virtual media changed (monitor commands eject, change) + * Argument load is true on load and false on eject. * Beware: doesn't run when a host device's physical media * changes. Sure would be useful if it did. * Device models with removable media must implement this callback. */ - void (*change_media_cb)(void *opaque); + void (*change_media_cb)(void *opaque, bool load); /* * Is the virtual tray open? * Device models implement this only when the device has a tray. -- cgit v1.2.1