diff mbox

[1/1] block: fix block tray status

Message ID df64e36c8fbd979d9cef621b41f2e935963ce4dc.1344508099.git.phrdina@redhat.com
State New
Headers show

Commit Message

Pavel Hrdina Aug. 9, 2012, 10:44 a.m. UTC
The tray status should change also if you eject empty block device.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
 block.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Kevin Wolf Sept. 4, 2012, 2:46 p.m. UTC | #1
Am 09.08.2012 12:44, schrieb Pavel Hrdina:
> The tray status should change also if you eject empty block device.
> 
> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>

Thanks, applied to block-next.

Kevin
diff mbox

Patch

diff --git a/block.c b/block.c
index 24323c1..3d23507 100644
--- a/block.c
+++ b/block.c
@@ -897,10 +897,10 @@  void bdrv_close(BlockDriverState *bs)
             bdrv_delete(bs->file);
             bs->file = NULL;
         }
-
-        bdrv_dev_change_media_cb(bs, false);
     }
 
+    bdrv_dev_change_media_cb(bs, false);
+
     /*throttling disk I/O limits*/
     if (bs->io_limits_enabled) {
         bdrv_io_limits_disable(bs);