diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-25 13:39:32 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-08-10 17:38:35 +1000 |
commit | 5af11b675242b2971f47c42a57b892dc24eb1917 (patch) | |
tree | 63b244089cba57d9e60339215f412f67e469c080 | |
parent | 33e7831b5fabc5c9dcc0224800a04761086952a7 (diff) |
Use LogMessageVerbSigSafe if available
Messages logged during the signal handler should use LogMessageVerbSigSafe
as of ABI 18.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r-- | src/evdev.c | 19 | ||||
-rw-r--r-- | src/evdev.h | 4 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/evdev.c b/src/evdev.c index ced6561..2aab97f 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -342,7 +342,7 @@ EvdevNextInQueue(InputInfoPtr pInfo) if (pEvdev->num_queue >= EVDEV_MAXQUEUE) { - xf86IDrvMsg(pInfo, X_NONE, "dropping event due to full queue!\n"); + LogMessageVerbSigSafe(X_WARNING, 0, "dropping event due to full queue!\n"); return NULL; } @@ -794,9 +794,10 @@ EvdevProcessTouchEvent(InputInfoPtr pInfo, struct input_event *ev) valuator_mask_copy(pEvdev->mt_mask, pEvdev->last_mt_vals[slot_index]); else - xf86IDrvMsg(pInfo, X_WARNING, - "Attempted to copy values from out-of-range " - "slot, touch events may be incorrect.\n"); + LogMessageVerbSigSafe(X_WARNING, 0, + "%s: Attempted to copy values from out-of-range " + "slot, touch events may be incorrect.\n", + pInfo->name); } else pEvdev->slot_state = SLOTSTATE_CLOSE; } else { @@ -1115,19 +1116,15 @@ EvdevReadInput(InputInfoPtr pInfo) if (errno == ENODEV) /* May happen after resume */ xf86RemoveEnabledDevice(pInfo); else if (errno != EAGAIN) - { - /* We use X_NONE here because it doesn't alloc */ - xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name, - strerror(errno)); - } + LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error: %s\n", pInfo->name, + strerror(errno)); break; } /* The kernel promises that we always only read a complete * event, so len != sizeof ev is an error. */ if (len % sizeof(ev[0])) { - /* We use X_NONE here because it doesn't alloc */ - xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name, strerror(errno)); + LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error: %s\n", pInfo->name, strerror(errno)); break; } diff --git a/src/evdev.h b/src/evdev.h index c2f9246..2901886 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -67,6 +67,10 @@ #define HAVE_SMOOTH_SCROLLING 1 #endif +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 18 +#define LogMessageVerbSigSafe xf86MsgVerb +#endif + #define EVDEV_MAXBUTTONS 32 #define EVDEV_MAXQUEUE 32 |