[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/16] block: Remove bdrv_open_image()
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 06/16] block: Remove bdrv_open_image() |
Date: |
Thu, 17 Sep 2015 15:48:10 +0200 |
It is unused now.
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 34 ----------------------------------
include/block/block.h | 4 ----
2 files changed, 38 deletions(-)
diff --git a/block.c b/block.c
index 93d713b..3992241 100644
--- a/block.c
+++ b/block.c
@@ -1279,40 +1279,6 @@ done:
return c;
}
-/*
- * This is a version of bdrv_open_child() that returns 0/-EINVAL instead of
- * a BdrvChild object.
- *
- * If allow_none is true, no image will be opened if filename is false and no
- * BlockdevRef is given. *pbs will remain unchanged and 0 will be returned.
- *
- * To conform with the behavior of bdrv_open(), *pbs has to be NULL.
- */
-int bdrv_open_image(BlockDriverState **pbs, const char *filename,
- QDict *options, const char *bdref_key,
- BlockDriverState* parent, const BdrvChildRole *child_role,
- bool allow_none, Error **errp)
-{
- Error *local_err = NULL;
- BdrvChild *c;
-
- assert(pbs);
- assert(*pbs == NULL);
-
- c = bdrv_open_child(filename, options, bdref_key, parent, child_role,
- allow_none, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- return -EINVAL;
- }
-
- if (c != NULL) {
- *pbs = c->bs;
- }
-
- return 0;
-}
-
int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags, Error **errp)
{
/* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */
diff --git a/include/block/block.h b/include/block/block.h
index 79b2e91..130477c 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -204,10 +204,6 @@ void bdrv_swap(BlockDriverState *bs_new, BlockDriverState
*bs_old);
void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top);
int bdrv_parse_cache_flags(const char *mode, int *flags);
int bdrv_parse_discard_flags(const char *mode, int *flags);
-int bdrv_open_image(BlockDriverState **pbs, const char *filename,
- QDict *options, const char *bdref_key,
- BlockDriverState* parent, const BdrvChildRole *child_role,
- bool allow_none, Error **errp);
BdrvChild *bdrv_open_child(const char *filename,
QDict *options, const char *bdref_key,
BlockDriverState* parent,
--
1.8.3.1
- [Qemu-devel] [PATCH 02/16] vmdk: Use BdrvChild instead of BDS for references to extents, (continued)
- [Qemu-devel] [PATCH 02/16] vmdk: Use BdrvChild instead of BDS for references to extents, Kevin Wolf, 2015/09/17
- [Qemu-devel] [PATCH 01/16] block: Introduce BDS.file_child, Kevin Wolf, 2015/09/17
- [Qemu-devel] [PATCH 04/16] quorum: Convert to BdrvChild, Kevin Wolf, 2015/09/17
- [Qemu-devel] [PATCH 06/16] block: Remove bdrv_open_image(),
Kevin Wolf <=
- [Qemu-devel] [PATCH 09/16] block: Split bdrv_move_feature_fields(), Kevin Wolf, 2015/09/17
- [Qemu-devel] [PATCH 08/16] block: Manage backing file references in bdrv_set_backing_hd(), Kevin Wolf, 2015/09/17
- [Qemu-devel] [PATCH 10/16] block/io: Make bdrv_requests_pending() public, Kevin Wolf, 2015/09/17