From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGQ2l-0003eC-RE for qemu-devel@nongnu.org; Mon, 02 Sep 2013 05:03:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGQ2c-0001NO-QM for qemu-devel@nongnu.org; Mon, 02 Sep 2013 05:03:31 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:51357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGQ2c-0001Mi-5F for qemu-devel@nongnu.org; Mon, 02 Sep 2013 05:03:22 -0400 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 2 Sep 2013 18:49:28 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id C9BF02BB0052 for ; Mon, 2 Sep 2013 19:03:17 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r828kuEc2032054 for ; Mon, 2 Sep 2013 18:46:57 +1000 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r8293HKi010551 for ; Mon, 2 Sep 2013 19:03:17 +1000 From: Lei Li Date: Mon, 2 Sep 2013 17:01:47 +0800 Message-Id: <1378112508-8970-4-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: <1378112508-8970-1-git-send-email-lilei@linux.vnet.ibm.com> References: <1378112508-8970-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 3/4] qemu-char: export ringbuf_count List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Lei Li , anthony@codemonkey.ws, lcapitulino@redhat.com Signed-off-by: Lei Li --- include/sysemu/char.h | 2 ++ qemu-char.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 8053130..ed20fe3 100644 --- a/include/sysemu/char.h +++ b/include/sysemu/char.h @@ -288,6 +288,8 @@ void register_char_driver_qapi(const char *name, ChardevBackendKind kind, /* add an eventfd to the qemu devices that are polled */ CharDriverState *qemu_chr_open_eventfd(int eventfd); +size_t ringbuf_count(const CharDriverState *chr); + extern int term_escape_char; CharDriverState *qemu_char_get_next_serial(void); diff --git a/qemu-char.c b/qemu-char.c index 6259496..0d74fae 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2781,7 +2781,7 @@ typedef struct { uint8_t *cbuf; } RingBufCharDriver; -static size_t ringbuf_count(const CharDriverState *chr) +size_t ringbuf_count(const CharDriverState *chr) { const RingBufCharDriver *d = chr->opaque; -- 1.7.7.6