Skip to content

Commit cffbe52

Browse files
committed
tslib.c: use our own ts_error_fn to print to syslog too
1 parent 3fd2140 commit cffbe52

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/tslib.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ struct ts_priv {
8888
#endif
8989
};
9090

91+
static int errfn(const char *fmt, va_list ap)
92+
{
93+
xf86ErrorF(fmt, ap);
94+
95+
return vfprintf(stderr, fmt, ap);
96+
}
97+
9198
static void ReadInputLegacy(InputInfoPtr local)
9299
{
93100
struct ts_priv *priv = (struct ts_priv *) (local->private);
@@ -416,6 +423,8 @@ static int xf86TslibInit(__attribute__ ((unused)) InputDriverPtr drv,
416423

417424
pInfo->fd = ts_fd(priv->ts);
418425

426+
ts_error_fn = errfn;
427+
419428
/* process generic options */
420429
xf86CollectInputOptions(pInfo, NULL);
421430
xf86ProcessCommonOptions(pInfo, pInfo->options);

0 commit comments

Comments
 (0)