Flush the debug message out to the log file.
PATCH 1/1 Flush the debug message out to the log file.
This patch fluesh the debug messages to the log file at the end of each debug message.
Signed-off-by Venkateswararao Jujjuri <[email protected]>
--- hw/virtio-9p-debug.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
hw/virtio-9p-debug.c +2 -0
@@ -481,4 +481,6 @@ void pprint_pdu(V9fsPDU *pdu) }fprintf (llogfile,")\n" ); +/* Flush the log message out */ +fseek (llogfile,0L ,SEEK_CUR ); }
Signature · 1 line
1.6.5.2
Quoted 13 lines · 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 <[email protected]>--- hw/virtio-9p-debug.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)hw/virtio-9p-debug.c +0
-0
hw/virtio-9p-debug.c void pprint_pdu(V9fsPDU *pdu) · line 486
Quoted 6 lines
hw/virtio-9p-debug.c +2
-0@@ -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
Quoted 16 lines · Aneesh Kumar K. V
Quoted 15 lines · 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 <[email protected]>--- hw/virtio-9p-debug.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)hw/virtio-9p-debug.c +0
-0@@ -481,4 +481,6 @@ void pprint_pdu(V9fsPDU *pdu) }
Quoted 7 lines
hw/virtio-9p-debug.c void pprint_pdu(V9fsPDU *pdu) · line 486
Quoted 4 lines
hw/virtio-9p-debug.c +2
-0fprintf (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
Quoted 3 lines
-aneesh