From patchwork Mon Jan 28 13:22:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Beno=C3=AEt_Canet?= X-Patchwork-Id: 216185 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E42CF2C007A for ; Tue, 29 Jan 2013 00:22:24 +1100 (EST) Received: from localhost ([::1]:58909 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TzofG-0002p5-Sh for incoming@patchwork.ozlabs.org; Mon, 28 Jan 2013 08:22:22 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tzoep-0002IS-M7 for qemu-devel@nongnu.org; Mon, 28 Jan 2013 08:22:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tzoeh-0006NP-Tk for qemu-devel@nongnu.org; Mon, 28 Jan 2013 08:21:55 -0500 Received: from nodalink.pck.nerim.net ([62.212.105.220]:48225 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tzoeh-0006NL-M1 for qemu-devel@nongnu.org; Mon, 28 Jan 2013 08:21:47 -0500 Received: by paradis.irqsave.net (Postfix, from userid 1002) id 19695874322; Mon, 28 Jan 2013 14:21:46 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.77.1]) by paradis.irqsave.net (Postfix) with ESMTP id 3299A87431D; Mon, 28 Jan 2013 14:21:37 +0100 (CET) From: =?UTF-8?q?Beno=C3=AEt=20Canet?= To: qemu-devel@nongnu.org Date: Mon, 28 Jan 2013 14:22:16 +0100 Message-Id: <1359379338-5974-3-git-send-email-benoit@irqsave.net> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1359379338-5974-1-git-send-email-benoit@irqsave.net> References: <1359379338-5974-1-git-send-email-benoit@irqsave.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 62.212.105.220 Cc: kwolf@redhat.com, =?UTF-8?q?Beno=C3=AEt=20Canet?= , stefanha@redhat.com Subject: [Qemu-devel] [PATCH 2/4] block: make path_hash_protocol public. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Benoit Canet --- block.c | 2 +- include/block/block.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index af22ee8..3bebc74 100644 --- a/block.c +++ b/block.c @@ -195,7 +195,7 @@ static void bdrv_io_limits_intercept(BlockDriverState *bs, } /* check if the path starts with ":" */ -static int path_has_protocol(const char *path) +int path_has_protocol(const char *path) { const char *p; diff --git a/include/block/block.h b/include/block/block.h index 4d83856..8bb47c4 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -121,6 +121,7 @@ bool bdrv_io_limits_enabled(BlockDriverState *bs); void bdrv_init(void); void bdrv_init_with_whitelist(void); BlockDriver *bdrv_find_protocol(const char *filename); +int path_has_protocol(const char *path); BlockDriver *bdrv_find_format(const char *format_name); BlockDriver *bdrv_find_whitelisted_format(const char *format_name); int bdrv_create(BlockDriver *drv, const char* filename,