For Version 4: * 0001: Fix more Guillem Jover review comments... Thanks! * 0001: Reviewed-by: Guillem Jover <guil...@hadrons.org>
Back in the bad old days, using xf86Msg() from a signal handler was a big no-no, as it would deadlock the system on malloc when the prefix is prepended. Thus, only X_NONE messages could be used to bypass this. However, LogVWrite limits to 1024 bytes anyway, so a patch was made to eliminate malloc in LogVMessageVerb(). However, input driver messages these days go through xf86VIDrvMsgVerb(), which does its own asprintf()/mallocs() to prefix the driver and device names, reintroducing the same old no-no. This patchset fixes this by introducing LogVHdrMessageVerb() and friends, which allow a caller to specify a custom header as a variable string, between the verb and the actually message. In addition, by passing the header to the log layer, the verbosity checks happen before any string processing, potentially speeding up processing for production systems. Daniel Kurtz (4): os/log: Pull LogMessageTypeVerbString out of LogVMessageVerb os/log: Add LogVHdrMessageVerb and friends xf86Helper: use LogHdrMessageVerb in xf86VIDrvMsgVerb xf86Helper: use LogHdrMessageVerb in xf86VDrvMsgVerb hw/xfree86/common/xf86Helper.c | 50 ++g+++-------- include/os.h | 13 +++ os/log.c | 161 ++++++++++++++++++++++++++++------------ 3 files changed, 146 insertions(+), 78 deletions(-) -- 1.7.3.1 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel