Input drivers like to prepend the device name to logging messages using
LogVHdrMessageVerb(). The current implementation of this function used the
output of a snprintf() as the format string of another snprintf(). This is a
big no-no, as a device name containing format strings could cause "Bad Things"
to happen.
This patchset also cleans up how and when timestamps are appended to messages.
There was a subtle bug when using LogVWrite() directly that could cause a
timestamps written to the logfile to not correspond to the message on the
same line.
Daniel Kurtz (4):
os/log: trivial cleanups
os/xprintf: add Xvscnprintf and Xscnprintf
os/log: only write timestamp if a message is actually written to
logfile
os/log: refactor logging
include/Xprintf.h | 12 ++++++
os/log.c | 105 +++++++++++++++++++++++++----------------------------
os/xprintf.c | 44 ++++++++++++++++++++++
3 files changed, 106 insertions(+), 55 deletions(-)
--
1.7.7.3
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel