From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56164 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJm6l-0003AE-38 for qemu-devel@nongnu.org; Wed, 02 Jun 2010 07:27:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJm6j-0000Xj-9w for qemu-devel@nongnu.org; Wed, 02 Jun 2010 07:27:38 -0400 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:56547) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJm6i-0000Vz-Iu for qemu-devel@nongnu.org; Wed, 02 Jun 2010 07:27:37 -0400 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp03.in.ibm.com (8.14.4/8.13.1) with ESMTP id o52BRU3Q013279 for ; Wed, 2 Jun 2010 16:57:30 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o52BRSw62535508 for ; Wed, 2 Jun 2010 16:57:30 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o52BRSNV022581 for ; Wed, 2 Jun 2010 21:27:28 +1000 From: "Aneesh Kumar K. V" In-Reply-To: <1275423789-13850-1-git-send-email-jvrao@linux.vnet.ibm.com> References: <1275423789-13850-1-git-send-email-jvrao@linux.vnet.ibm.com> Date: Wed, 02 Jun 2010 16:57:27 +0530 Message-ID: <87vda1llnk.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [V9fs-developer] [PATCH] [virtio-9p] Flush the debug message out to the log file. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Venkateswararao Jujjuri (JV)" , qemu-devel@nongnu.org Cc: v9fs-developer@lists.sourceforge.net, aliguori@us.ibm.com On Tue, 1 Jun 2010 13:23:09 -0700, "Venkateswararao Jujjuri (JV)" wrote: > This patch fluesh the debug messages to the log file at the end of each > debug message. > > Signed-off-by: Venkateswararao Jujjuri > --- > hw/virtio-9p-debug.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/hw/virtio-9p-debug.c b/hw/virtio-9p-debug.c > index 2fb2673..5bfa689 100644 > --- a/hw/virtio-9p-debug.c > +++ b/hw/virtio-9p-debug.c > @@ -481,4 +481,6 @@ void pprint_pdu(V9fsPDU *pdu) > } > > fprintf(llogfile, ")\n"); > + /* Flush the log message out */ > + fseek(llogfile, 0L, SEEK_CUR); > } Why do one use fseek to flush ? why not fflush(3) -aneesh