diff options
Diffstat (limited to 'block/block-backend.c')
-rw-r--r-- | block/block-backend.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index a67a463615..e2cda1c3d5 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1296,6 +1296,11 @@ void blk_eject(BlockBackend *blk, bool eject_flag) if (bs) { bdrv_eject(bs, eject_flag); } + + /* Whether or not we ejected on the backend, + * the frontend experienced a tray event. */ + qapi_event_send_device_tray_moved(blk_name(blk), + eject_flag, &error_abort); } int blk_get_flags(BlockBackend *blk) |