From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZloTK-0005jZ-Vw for qemu-devel@nongnu.org; Mon, 12 Oct 2015 21:33:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZloTK-0007KT-0Y for qemu-devel@nongnu.org; Mon, 12 Oct 2015 21:33:46 -0400 Date: Mon, 12 Oct 2015 21:33:40 -0400 From: Jeff Cody Message-ID: <20151013013340.GM11943@localhost.localdomain> References: <1444392941-28704-1-git-send-email-kwolf@redhat.com> <1444392941-28704-7-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1444392941-28704-7-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 06/16] block: Remove bdrv_open_image() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: berto@igalia.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, armbru@redhat.com, stefanha@redhat.com, famz@redhat.com, mreitz@redhat.com On Fri, Oct 09, 2015 at 02:15:31PM +0200, Kevin Wolf wrote: > It is unused now. > > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > Reviewed-by: Alberto Garcia > Reviewed-by: Fam Zheng > --- > block.c | 34 ---------------------------------- > include/block/block.h | 4 ---- > 2 files changed, 38 deletions(-) > > diff --git a/block.c b/block.c > index 8fd345b..33ecd93 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 7ebb35d..c6854a6 100644 > --- a/include/block/block.h > +++ b/include/block/block.h > @@ -205,10 +205,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 > Reviewed-by: Jeff Cody