]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Add qdev ID to DEVICE_TRAY_MOVED
authorKevin Wolf <kwolf@redhat.com>
Thu, 29 Sep 2016 16:30:53 +0000 (18:30 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 7 Oct 2016 11:34:22 +0000 (13:34 +0200)
commit2d76e724cf9e3f9fec6070a8af79c7ee4c2e763e
tree771cea6c18fb0f0007ab2d716023e516e329eed3
parentbbc8ea98bc8a2ba8174d106184f3089248d5ec5d
block: Add qdev ID to DEVICE_TRAY_MOVED

The event currently only contains the BlockBackend name. However, with
anonymous BlockBackends, this is always the empty string. Add the qdev
ID (or if none was given, the QOM path) so that the user can still see
which device caused the event.

Event generation has to be moved from bdrv_eject() to the BlockBackend
because the BDS doesn't know the attached device, but that's easy
because blk_eject() is the only user of it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
block.c
block/block-backend.c
docs/qmp-commands.txt
docs/qmp-events.txt
qapi/block.json