From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHDm-0006xv-6i for qemu-devel@nongnu.org; Wed, 12 Jul 2017 08:58:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHDl-0001LH-F3 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 08:58:26 -0400 From: Kevin Wolf Date: Wed, 12 Jul 2017 14:57:23 +0200 Message-Id: <1499864249-26305-4-git-send-email-kwolf@redhat.com> In-Reply-To: <1499864249-26305-1-git-send-email-kwolf@redhat.com> References: <1499864249-26305-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 3/9] block: Make blk_all_next() public List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, mreitz@redhat.com, eblake@redhat.com, jsnow@redhat.com, pbonzini@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org Signed-off-by: Kevin Wolf --- block/block-backend.c | 2 +- include/sysemu/block-backend.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/block/block-backend.c b/block/block-backend.c index d60e53b..15072f8 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -342,7 +342,7 @@ void blk_unref(BlockBackend *blk) * Behaves similarly to blk_next() but iterates over all BlockBackends, even the * ones which are hidden (i.e. are not referenced by the monitor). */ -static BlockBackend *blk_all_next(BlockBackend *blk) +BlockBackend *blk_all_next(BlockBackend *blk) { return blk ? QTAILQ_NEXT(blk, link) : QTAILQ_FIRST(&block_backends); diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 80096f2..dfdd3b8 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -100,6 +100,7 @@ void blk_remove_all_bs(void); const char *blk_name(const BlockBackend *blk); BlockBackend *blk_by_name(const char *name); BlockBackend *blk_next(BlockBackend *blk); +BlockBackend *blk_all_next(BlockBackend *blk); bool monitor_add_blk(BlockBackend *blk, const char *name, Error **errp); void monitor_remove_blk(BlockBackend *blk); -- 1.8.3.1