From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFpKL-0006Z4-0o for qemu-devel@nongnu.org; Mon, 26 Jan 2015 14:28:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFpKJ-0001jw-HG for qemu-devel@nongnu.org; Mon, 26 Jan 2015 14:28:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFpKJ-0001jj-8n for qemu-devel@nongnu.org; Mon, 26 Jan 2015 14:27:59 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0QJRwve012379 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 26 Jan 2015 14:27:58 -0500 From: Max Reitz Date: Mon, 26 Jan 2015 14:27:35 -0500 Message-Id: <1422300468-16216-9-git-send-email-mreitz@redhat.com> In-Reply-To: <1422300468-16216-1-git-send-email-mreitz@redhat.com> References: <1422300468-16216-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 08/21] block: Make bdrv_close() static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Markus Armbruster , Stefan Hajnoczi , Max Reitz There are no users of bdrv_close() left, except for one of bdrv_open()'s failure paths, bdrv_close_all() and bdrv_delete(), and that is good. Make bdrv_close() static so nobody makes the mistake of directly using bdrv_close() again. Signed-off-by: Max Reitz --- block.c | 4 +++- include/block/block.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 0c6ab96..0cd6457 100644 --- a/block.c +++ b/block.c @@ -107,6 +107,8 @@ static int use_bdrv_whitelist; static NotifierList close_all_notifiers = NOTIFIER_LIST_INITIALIZER(close_all_notifiers); +static void bdrv_close(BlockDriverState *bs); + #ifdef _WIN32 static int is_windows_drive_prefix(const char *filename) { @@ -1850,7 +1852,7 @@ void bdrv_reopen_abort(BDRVReopenState *reopen_state) } -void bdrv_close(BlockDriverState *bs) +static void bdrv_close(BlockDriverState *bs) { BdrvAioNotifier *ban, *ban_next; diff --git a/include/block/block.h b/include/block/block.h index 2b7b3d6..6688920 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -191,7 +191,6 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue, Error **errp); void bdrv_reopen_commit(BDRVReopenState *reopen_state); void bdrv_reopen_abort(BDRVReopenState *reopen_state); -void bdrv_close(BlockDriverState *bs); int bdrv_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors); int bdrv_read_unthrottled(BlockDriverState *bs, int64_t sector_num, -- 2.1.0