All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] [virtio-9p] Flush the debug message out to the log file.
@ 2010-06-01 20:23 Venkateswararao Jujjuri (JV)
  2010-06-02 11:27 ` [Qemu-devel] Re: [V9fs-developer] " Aneesh Kumar K. V
  0 siblings, 1 reply; 3+ messages in thread
From: Venkateswararao Jujjuri (JV) @ 2010-06-01 20:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: v9fs-developer, aliguori, Venkateswararao Jujjuri (JV)

This patch fluesh the debug messages to the log file  at the end of each
debug message.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
---
 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);
 }
-- 
1.6.5.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: [V9fs-developer] [PATCH] [virtio-9p] Flush the debug message out to the log file.
  2010-06-01 20:23 [Qemu-devel] [PATCH] [virtio-9p] Flush the debug message out to the log file Venkateswararao Jujjuri (JV)
@ 2010-06-02 11:27 ` Aneesh Kumar K. V
  2010-06-02 14:32   ` Venkateswararao Jujjuri (JV)
  0 siblings, 1 reply; 3+ messages in thread
From: Aneesh Kumar K. V @ 2010-06-02 11:27 UTC (permalink / raw)
  To: Venkateswararao Jujjuri (JV), qemu-devel; +Cc: v9fs-developer, aliguori

On Tue,  1 Jun 2010 13:23:09 -0700, "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com> wrote:
> This patch fluesh the debug messages to the log file  at the end of each
> debug message.
> 
> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Re: [V9fs-developer] [PATCH] [virtio-9p] Flush the debug message out to the log file.
  2010-06-02 11:27 ` [Qemu-devel] Re: [V9fs-developer] " Aneesh Kumar K. V
@ 2010-06-02 14:32   ` Venkateswararao Jujjuri (JV)
  0 siblings, 0 replies; 3+ messages in thread
From: Venkateswararao Jujjuri (JV) @ 2010-06-02 14:32 UTC (permalink / raw)
  To: Aneesh Kumar K. V; +Cc: v9fs-developer, aliguori, qemu-devel

Aneesh Kumar K. V wrote:
> On Tue,  1 Jun 2010 13:23:09 -0700, "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com> wrote:
>> This patch fluesh the debug messages to the log file  at the end of each
>> debug message.
>>
>> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
>> ---
>>  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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-02 14:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-01 20:23 [Qemu-devel] [PATCH] [virtio-9p] Flush the debug message out to the log file Venkateswararao Jujjuri (JV)
2010-06-02 11:27 ` [Qemu-devel] Re: [V9fs-developer] " Aneesh Kumar K. V
2010-06-02 14:32   ` Venkateswararao Jujjuri (JV)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.