Blame 0165-block-fix-block-tray-status.patch

5544c1
From 8794685f3ebb2d0001ab01bc8692d99242aedb4f Mon Sep 17 00:00:00 2001
5544c1
From: Pavel Hrdina <phrdina@redhat.com>
5544c1
Date: Thu, 9 Aug 2012 12:44:48 +0200
5544c1
Subject: [PATCH] block: fix block tray status
5544c1
5544c1
The tray status should change also if you eject empty block device.
5544c1
5544c1
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
5544c1
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
5544c1
(cherry picked from commit 9ca111544c64b5abed2e79cf52e19a8f227b347b)
5544c1
5544c1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1
---
5544c1
 block.c | 4 ++--
5544c1
 1 file changed, 2 insertions(+), 2 deletions(-)
5544c1
5544c1
diff --git a/block.c b/block.c
5544c1
index 470bdcc..c754353 100644
5544c1
--- a/block.c
5544c1
+++ b/block.c
5544c1
@@ -897,10 +897,10 @@ void bdrv_close(BlockDriverState *bs)
5544c1
             bdrv_delete(bs->file);
5544c1
             bs->file = NULL;
5544c1
         }
5544c1
-
5544c1
-        bdrv_dev_change_media_cb(bs, false);
5544c1
     }
5544c1
 
5544c1
+    bdrv_dev_change_media_cb(bs, false);
5544c1
+
5544c1
     /*throttling disk I/O limits*/
5544c1
     if (bs->io_limits_enabled) {
5544c1
         bdrv_io_limits_disable(bs);
5544c1
-- 
5544c1
1.7.12.1
5544c1