Patchwork [v4,1/3] block: make bdrv_dev_change_media_cb() public

login
register
mail settings
Submitter Pavel Hrdina
Date June 24, 2013, 12:12 p.m.
Message ID <692e710e9f1943ff0cdc314b695ec48184d5740f.1372072312.git.phrdina@redhat.com>
Download mbox | patch
Permalink /patch/253811/
State New
Headers show

Comments

Pavel Hrdina - June 24, 2013, 12:12 p.m.
From: Luiz Capitulino <lcapitulino@redhat.com>

Next commit wants to use it.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
 block.c               | 3 +--
 include/block/block.h | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/block.c b/block.c
index b88ad2f..89574de 100644
--- a/block.c
+++ b/block.c
@@ -56,7 +56,6 @@  typedef enum {
     BDRV_REQ_ZERO_WRITE   = 0x2,
 } BdrvRequestFlags;
 
-static void bdrv_dev_change_media_cb(BlockDriverState *bs, bool load);
 static BlockDriverAIOCB *bdrv_aio_readv_em(BlockDriverState *bs,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
         BlockDriverCompletionFunc *cb, void *opaque);
@@ -1682,7 +1681,7 @@  static void bdrv_emit_qmp_eject_event(BlockDriverState *bs, bool ejected)
     qobject_decref(data);
 }
 
-static void bdrv_dev_change_media_cb(BlockDriverState *bs, bool load)
+void bdrv_dev_change_media_cb(BlockDriverState *bs, bool load)
 {
     if (bs->dev_ops && bs->dev_ops->change_media_cb) {
         bool tray_was_closed = !bdrv_dev_is_tray_open(bs);
diff --git a/include/block/block.h b/include/block/block.h
index 2307f67..2cc93ab 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -148,6 +148,7 @@  void bdrv_set_dev_ops(BlockDriverState *bs, const BlockDevOps *ops,
                       void *opaque);
 void bdrv_dev_eject_request(BlockDriverState *bs, bool force);
 bool bdrv_dev_has_removable_media(BlockDriverState *bs);
+void bdrv_dev_change_media_cb(BlockDriverState *bs, bool load);
 bool bdrv_dev_is_tray_open(BlockDriverState *bs);
 bool bdrv_dev_is_medium_locked(BlockDriverState *bs);
 int bdrv_read(BlockDriverState *bs, int64_t sector_num,