On Tue, Jun 15, 2010 at 5:12 PM, Peter Hutterer <[email protected]> wrote: > Input driver messages are only standardised by convention, with the drivers > prefixing the device name to most messages. This makes it rather hard to > grep on "evdev" for example when looking for the evdev ouput. > > This patch adds three new logging functions, modeled after xf86DrvMsg(), the > logging function for output drivers. New functions are > xf86IDrvMsg() - input driver log message in default verbosity. > xf86IDrvMsgVerb() - input driver log message in specified verbosity. > xf86VIDrvMsgVerb() - same as xf86IDrvMsgVerb() but takes a varargs > argument. > > Default log format is <driver name>: <device name>: <message>. > > Signed-off-by: Peter Hutterer <[email protected]> > --- > Not sure if I want this in 1.9, I think it'll be part of the larger > refacturing that the input driver API needs anyway. > > hw/xfree86/common/xf86.h | 8 +++++++ > hw/xfree86/common/xf86Helper.c | 42 > ++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 50 insertions(+), 0 deletions(-) > > diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h > index d8629a8..b08f539 100644 > --- a/hw/xfree86/common/xf86.h > +++ b/hw/xfree86/common/xf86.h > @@ -51,6 +51,8 @@ > > #include "propertyst.h" > > +struct _LocalDeviceRec; /* for xf86IDrvMsg */
Since this definition is in xf86Xinput.h, xf86Xinput.h is part of the SDK, and these functions have to do with input devices, does it make sense to put the declarations there and the code in xf86Xinput.c? Or keep the code in xf86Helper.c and include xf86Xinput.h from xf86.h? It just seems kind of silly to have this declaration here when it's already being exported to the drivers. Looks good otherwise (with Alan's Xprintf suggestion). Reviewed-by: Dan Nicholson <[email protected]> _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
