From patchwork Thu Aug 9 10:11:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Xia X-Patchwork-Id: 176045 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 06DBD2C0098 for ; Thu, 9 Aug 2012 20:12:43 +1000 (EST) Received: from localhost ([::1]:51673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzPjM-0003Gu-V5 for incoming@patchwork.ozlabs.org; Thu, 09 Aug 2012 06:12:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzPj5-0002ra-39 for qemu-devel@nongnu.org; Thu, 09 Aug 2012 06:12:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzPj3-00076r-LU for qemu-devel@nongnu.org; Thu, 09 Aug 2012 06:12:22 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:56209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzPj3-000754-0U for qemu-devel@nongnu.org; Thu, 09 Aug 2012 06:12:21 -0400 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Aug 2012 15:42:14 +0530 Received: from d28relay02.in.ibm.com (9.184.220.59) by e28smtp08.in.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 9 Aug 2012 15:42:12 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q79ACBSM27459696 for ; Thu, 9 Aug 2012 15:42:11 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q79ACA7Z028845 for ; Thu, 9 Aug 2012 20:12:11 +1000 Received: from RedHat62GAWSWenchao (wenchaox.cn.ibm.com [9.115.122.25]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q79ABHWP022414; Thu, 9 Aug 2012 20:12:08 +1000 From: Wenchao Xia To: qemu-devel@nongnu.org Date: Thu, 9 Aug 2012 18:11:12 +0800 Message-Id: <1344507072-11106-1-git-send-email-xiawenc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 x-cbid: 12080910-2000-0000-0000-000008A739D9 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 122.248.162.8 Cc: stefanha@gmail.com, aliguori@us.ibm.com, Wenchao Xia , pbonzini@redhat.com Subject: [Qemu-devel] [qemu-devel] [PATCH V2 1/3] [RFC] libqblock-adding libqblock-test 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 This patch modify Makefile and expose a API in block.c that libqblock need. Signed-off-by: Wenchao Xia --- Makefile | 3 +++ block.c | 2 +- block.h | 1 + 3 files changed, 5 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 621cb86..a5691ee 100644 --- a/Makefile +++ b/Makefile @@ -160,6 +160,9 @@ tools-obj-y = $(oslib-obj-y) $(trace-obj-y) qemu-tool.o qemu-timer.o \ iohandler.o cutils.o iov.o async.o tools-obj-$(CONFIG_POSIX) += compatfd.o +libqblock-test$(EXESUF): libqblock.o libqblock-test.o $(tools-obj-y) $(block-obj-y) + $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)," LINK $@") + qemu-img$(EXESUF): qemu-img.o $(tools-obj-y) $(block-obj-y) qemu-nbd$(EXESUF): qemu-nbd.o $(tools-obj-y) $(block-obj-y) qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y) diff --git a/block.c b/block.c index b38940b..d30f363 100644 --- a/block.c +++ b/block.c @@ -196,7 +196,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/block.h b/block.h index c89590d..3aca2fd 100644 --- a/block.h +++ b/block.h @@ -403,4 +403,5 @@ typedef enum { #define BLKDBG_EVENT(bs, evt) bdrv_debug_event(bs, evt) void bdrv_debug_event(BlockDriverState *bs, BlkDebugEvent event); +int path_has_protocol(const char *path); #endif