qemu exec.c monitor.c
CVSROOT: /sources/qemu
Module name: qemu
Changes by: Paul Brook <pbrook> 07/06/30 13:53:24
Modified files:
. : exec.c monitor.c
Log message:
Allow changing log filename.
Close logfile when logging is disabled.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/exec.c?cvsroot=qemu&r1=1.101&r2=1.102
http://cvs.savannah.gnu.org/viewcvs/qemu/monitor.c?cvsroot=qemu&r1=1.74&r2=1.75
ANSI / POSIX do not define "wa" as mode string for fopen. I have no idea how many implementations of libc will fail with this mode which was introduced by the latest version of exec.c.
The standard mode for append is just "a". Even better (because it is faster and creates smaller log files for Windows) is "ab" for append and "wb" otherwise.
Stefan
Quoted 10 lines · Paul Brook
CVSROOT: /sources/qemu
Module name: qemu
Changes by: Paul Brook <pbrook> 07/06/30 13:53:24Modified files:
. :exec.cmonitor.cLog message:
Allow changing log filename.
Close logfile when logging is disabled.
Quoted 6 lines · Stefan Weil
ANSI / POSIX do not define "wa" as mode string for fopen. I have no idea how many implementations of libc will fail with this mode which was introduced by the latest version of
exec.c.The standard mode for append is just "a".
You are correct. I've fixed this.
Quoted 3 lines
Even better (because it is faster and creates smaller log files for Windows) is "ab" for append and "wb" otherwise.
We're writing human-readable text, so opening in binary mode is IMHO fairly dubious. If you really want fast logs/traces there are better ways to speed it up.
Paul