Received: from eggs.gnu.org ([140.186.70.92]:49233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1yk5-0001Kz-7u for qemu-devel@nongnu.org; Fri, 09 Sep 2011 06:55:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1yk4-0006TL-3x for qemu-devel@nongnu.org; Fri, 09 Sep 2011 06:55:29 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:47079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1yk3-0006Sn-Bw for qemu-devel@nongnu.org; Fri, 09 Sep 2011 06:55:28 -0400 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp01.au.ibm.com (8.14.4/8.13.1) with ESMTP id p89Aoa5w010274 for ; Fri, 9 Sep 2011 20:50:36 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p89ArctA1249454 for ; Fri, 9 Sep 2011 20:53:40 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p89AtHUO031648 for ; Fri, 9 Sep 2011 20:55:17 +1000 From: "Aneesh Kumar K.V" Date: Fri, 9 Sep 2011 16:24:06 +0530 Message-Id: <1315565653-14500-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> In-Reply-To: <1315565653-14500-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1315565653-14500-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1/8] hw/9pfs: Make v9fs_string* functions non-static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, "Aneesh Kumar K.V" We will use them later in other files Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p.c | 10 +++++----- hw/9pfs/virtio-9p.h | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index d28edb7..dc3e32b 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -80,20 +80,20 @@ void cred_init(FsCred *credp) credp->fc_rdev = -1; } -static void v9fs_string_init(V9fsString *str) +void v9fs_string_init(V9fsString *str) { str->data = NULL; str->size = 0; } -static void v9fs_string_free(V9fsString *str) +void v9fs_string_free(V9fsString *str) { g_free(str->data); str->data = NULL; str->size = 0; } -static void v9fs_string_null(V9fsString *str) +void v9fs_string_null(V9fsString *str) { v9fs_string_free(str); } @@ -192,7 +192,7 @@ alloc_print: return vsprintf(*strp, fmt, ap); } -static void GCC_FMT_ATTR(2, 3) +void GCC_FMT_ATTR(2, 3) v9fs_string_sprintf(V9fsString *str, const char *fmt, ...) { va_list ap; @@ -208,7 +208,7 @@ v9fs_string_sprintf(V9fsString *str, const char *fmt, ...) str->size = err; } -static void v9fs_string_copy(V9fsString *lhs, V9fsString *rhs) +void v9fs_string_copy(V9fsString *lhs, V9fsString *rhs) { v9fs_string_free(lhs); v9fs_string_sprintf(lhs, "%s", rhs->data); diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h index 17d44b4..8aeee4e 100644 --- a/hw/9pfs/virtio-9p.h +++ b/hw/9pfs/virtio-9p.h @@ -384,4 +384,9 @@ static inline size_t do_pdu_unpack(void *dst, struct iovec *sg, int sg_count, extern void handle_9p_output(VirtIODevice *vdev, VirtQueue *vq); extern void virtio_9p_set_fd_limit(void); extern void v9fs_reclaim_fd(V9fsState *s); +extern void v9fs_string_init(V9fsString *str); +extern void v9fs_string_free(V9fsString *str); +extern void v9fs_string_null(V9fsString *str); +extern void v9fs_string_sprintf(V9fsString *str, const char *fmt, ...); +extern void v9fs_string_copy(V9fsString *lhs, V9fsString *rhs); #endif -- 1.7.4.1