From patchwork Thu Jan 7 19:56:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 564442 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E5E37140323 for ; Fri, 8 Jan 2016 07:10:38 +1100 (AEDT) Received: from localhost ([::1]:60835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHGtH-0004Cq-TJ for incoming@patchwork.ozlabs.org; Thu, 07 Jan 2016 15:10:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHGmO-000776-26 for qemu-devel@nongnu.org; Thu, 07 Jan 2016 15:03:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHGmL-000058-6V for qemu-devel@nongnu.org; Thu, 07 Jan 2016 15:03:27 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:40797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHGmL-0008WS-2I for qemu-devel@nongnu.org; Thu, 07 Jan 2016 15:03:25 -0500 X-IronPort-AV: E=Sophos;i="5.20,534,1444694400"; d="scan'208";a="329696084" From: Wei Liu To: Date: Thu, 7 Jan 2016 19:56:19 +0000 Message-ID: <1452196584-17259-23-git-send-email-wei.liu2@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1452196584-17259-1-git-send-email-wei.liu2@citrix.com> References: <1452196584-17259-1-git-send-email-wei.liu2@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.63 Cc: "Michael S. Tsirkin" , Wei Liu , "Aneesh Kumar K.V" , Greg Kurz Subject: [Qemu-devel] [PATCH v2 22/27] 9pfs: export pdu_{submit, alloc, free} 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 They will be used in later patches. Signed-off-by: Wei Liu --- v2: new, part of original "9pfs: break out generic code from virtio-9p.{c,h}" --- hw/9pfs/9p.h | 3 +++ hw/9pfs/virtio-9p.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h index 9aeb874..b62c9a8 100644 --- a/hw/9pfs/9p.h +++ b/hw/9pfs/9p.h @@ -321,5 +321,8 @@ extern int v9fs_name_to_path(V9fsState *s, V9fsPath *dirpath, ssize_t pdu_marshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...); ssize_t pdu_unmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...); +V9fsPDU *pdu_alloc(V9fsState *s); +void pdu_free(V9fsPDU *pdu); +void pdu_submit(V9fsPDU *pdu); #endif diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index 0ba2312..c74e601 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -592,7 +592,7 @@ static int fid_to_qid(V9fsPDU *pdu, V9fsFidState *fidp, V9fsQID *qidp) return 0; } -static V9fsPDU *pdu_alloc(V9fsState *s) +V9fsPDU *pdu_alloc(V9fsState *s) { V9fsPDU *pdu = NULL; @@ -604,7 +604,7 @@ static V9fsPDU *pdu_alloc(V9fsState *s) return pdu; } -static void pdu_free(V9fsPDU *pdu) +void pdu_free(V9fsPDU *pdu) { if (pdu) { V9fsState *s = pdu->s; @@ -3251,7 +3251,7 @@ static inline bool is_read_only_op(V9fsPDU *pdu) } } -static void pdu_submit(V9fsPDU *pdu) +void pdu_submit(V9fsPDU *pdu) { Coroutine *co; CoroutineEntry *handler;