From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38475 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJoza-00069G-EB for qemu-devel@nongnu.org; Wed, 02 Jun 2010 10:32:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJozZ-0004xU-51 for qemu-devel@nongnu.org; Wed, 02 Jun 2010 10:32:26 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:59198) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJozZ-0004xC-2f for qemu-devel@nongnu.org; Wed, 02 Jun 2010 10:32:25 -0400 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by e4.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o52EJO51002080 for ; Wed, 2 Jun 2010 10:19:24 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o52EWNCs060910 for ; Wed, 2 Jun 2010 10:32:23 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o52EWNug026047 for ; Wed, 2 Jun 2010 10:32:23 -0400 Message-ID: <4C066B77.6060105@linux.vnet.ibm.com> Date: Wed, 02 Jun 2010 07:32:23 -0700 From: "Venkateswararao Jujjuri (JV)" MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [V9fs-developer] [PATCH] [virtio-9p] Flush the debug message out to the log file. References: <1275423789-13850-1-git-send-email-jvrao@linux.vnet.ibm.com> <87vda1llnk.fsf@linux.vnet.ibm.com> In-Reply-To: <87vda1llnk.fsf@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Aneesh Kumar K. V" Cc: v9fs-developer@lists.sourceforge.net, aliguori@us.ibm.com, qemu-devel@nongnu.org Aneesh Kumar K. V wrote: > 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) Good question. :) Even though functionally both are same, I will send a patch with fflush() as it is more straightforward. - JV > > -aneesh >