Patchwork [v3,2/6] block: add bdrv_get_conversion_options()

login
register
mail settings
Submitter Devin Nakamura
Date July 13, 2011, 12:57 p.m.
Message ID <1310561864-18964-2-git-send-email-devin122@gmail.com>
Download mbox | patch
Permalink /patch/104502/
State New
Headers show

Comments

Devin Nakamura - July 13, 2011, 12:57 p.m.
Signed-off-by: Devin Nakamura <devin122@gmail.com>
---
 block.c |   13 +++++++++++++
 block.h |    2 ++
 2 files changed, 15 insertions(+), 0 deletions(-)

Patch

diff --git a/block.c b/block.c
index 24a25d5..5c0ba2d 100644
--- a/block.c
+++ b/block.c
@@ -3018,3 +3018,16 @@  out:
 
     return ret;
 }
+
+int bdrv_get_conversion_options(BlockDriverState *bs,
+                                QEMUOptionParameter **options)
+{
+    if (!bs->drv) {
+        return -ENOENT;
+    }
+
+    if (!bs->drv->bdrv_get_conversion_options) {
+        return -ENOTSUP;
+    }
+    return bs->drv->bdrv_get_conversion_options(bs, options);
+}
diff --git a/block.h b/block.h
index 859d1d9..ca0af6d 100644
--- a/block.h
+++ b/block.h
@@ -250,6 +250,8 @@  int64_t bdrv_get_dirty_count(BlockDriverState *bs);
 void bdrv_set_in_use(BlockDriverState *bs, int in_use);
 int bdrv_in_use(BlockDriverState *bs);
 
+int bdrv_get_conversion_options(BlockDriverState *bs,
+                                QEMUOptionParameter **options);
 typedef enum {
     BLKDBG_L1_UPDATE,