On Monday, August 13, 2012, Peter Hutterer wrote:

> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net <javascript:;>>


Acked-by: Ping Cheng <pingli...@gmail.com>.

Ping

---
> If you've seen weird backtraces in your log about inSignalContext, this is
> what's missing
>
>  src/wcmCommon.c      | 11 ++++++-----
>  src/wcmISDV4.c       | 17 +++++++++--------
>  src/wcmTouchFilter.c |  2 +-
>  src/wcmUSB.c         | 24 ++++++++++++++----------
>  src/xf86Wacom.c      |  3 ++-
>  src/xf86Wacom.h      |  5 +++++
>  6 files changed, 37 insertions(+), 25 deletions(-)
>
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index 7199105..d29fbc9 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -960,8 +960,8 @@ void wcmEvent(WacomCommonPtr common, unsigned int
> channel,
>                 if (priv == NULL || !IsTouch(priv))
>                 {
>                         priv = common->wcmDevices;
> -                       xf86Msg(X_ERROR, "could not find touch device "
> -                               "for device on %s.\n",
> common->device_path);
> +                       LogMessageVerbSigSafe(X_ERROR, 0, "could not find
> touch device "
> +                                             "for device on %s.\n",
> common->device_path);
>                 }
>         }
>
> @@ -1103,8 +1103,9 @@ normalizePressure(const WacomDevicePtr priv, const
> WacomDeviceState *ds)
>
>         if (p < priv->minPressure)
>         {
> -               xf86Msg(X_ERROR, "%s: Pressure %d lower than expected
> minimum %d. This is a bug.\n",
> -                       priv->pInfo->name, ds->pressure,
> priv->minPressure);
> +               LogMessageVerbSigSafe(X_ERROR, 0,
> +                                     "%s: Pressure %d lower than expected
> minimum %d. This is a bug.\n",
> +                                     priv->pInfo->name, ds->pressure,
> priv->minPressure);
>                 p = priv->minPressure;
>         }
>
> @@ -1190,7 +1191,7 @@ static void commonDispatchDevice(WacomCommonPtr
> common, unsigned int channel,
>         /* Tool on the tablet when driver starts. This sometime causes
>          * access errors to the device */
>         if (!tool->enabled) {
> -               xf86Msg(X_ERROR, "tool not initialized yet. Skipping
> event. \n");
> +               LogMessageVerbSigSafe(X_ERROR, 0, "tool not initialized
> yet. Skipping event. \n");
>                 return;
>         }
>
> diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c
> index 892fbff..409e358 100644
> --- a/src/wcmISDV4.c
> +++ b/src/wcmISDV4.c
> @@ -110,12 +110,12 @@ static void memdump(InputInfoPtr pInfo, char
> *buffer, unsigned int len)
>         /* can't use DBG macro here, need to do it manually. */
>         for (i = 0 ; i < len && common->debugLevel >= 10; i++)
>         {
> -               xf86Msg(X_NONE, "%#hhx ", buffer[i]);
> +               LogMessageVerbSigSafe(X_NONE, 0, "%#hhx ", buffer[i]);
>                 if (i % 8 == 7)
> -                       xf86Msg(X_NONE, "\n");
> +                       LogMessageVerbSigSafe(X_NONE, 0, "\n");
>         }
>
> -       xf86Msg(X_NONE, "\n");
> +       LogMessageVerbSigSafe(X_NONE, 0, "\n");
>  #endif
>  }
>
> @@ -165,7 +165,7 @@ static int wcmSerialValidate(InputInfoPtr pInfo, const
> unsigned char* data)
>         if (!(data[0] & HEADER_BIT))
>         {
>                 int n = wcmSkipInvalidBytes(data, common->wcmPktLength);
> -               xf86Msg(X_WARNING,
> +               LogMessageVerbSigSafe(X_WARNING, 0,
>                         "%s: missing header bit. skipping %d bytes.\n",
>                         pInfo->name, n);
>                 return n;
> @@ -178,7 +178,7 @@ static int wcmSerialValidate(InputInfoPtr pInfo, const
> unsigned char* data)
>         n = wcmSkipInvalidBytes(&data[1], common->wcmPktLength - 1);
>         n += 1; /* the header byte we already checked */
>         if (n != common->wcmPktLength) {
> -               xf86Msg(X_WARNING, "%s: bad data at %d v=%x l=%d\n",
> pInfo->name,
> +               LogMessageVerbSigSafe(X_WARNING, 0, "%s: bad data at %d
> v=%x l=%d\n", pInfo->name,
>                         n, data[n], common->wcmPktLength);
>                 return n;
>         }
> @@ -605,8 +605,8 @@ static int isdv4ParseTouchPacket(InputInfoPtr pInfo,
> const unsigned char *data,
>         rc = isdv4ParseTouchData(data, len, common->wcmPktLength,
> &touchdata);
>         if (rc == -1)
>         {
> -               xf86Msg(X_ERROR, "%s: failed to parse touch data.\n",
> -                               pInfo->name);
> +               LogMessageVerbSigSafe(X_ERROR, 0, "%s: failed to parse
> touch data.\n",
> +                                     pInfo->name);
>                 return -1;
>         }
>
> @@ -676,7 +676,8 @@ static int isdv4ParsePenPacket(InputInfoPtr pInfo,
> const unsigned char *data,
>
>         if (rc == -1)
>         {
> -               xf86Msg(X_ERROR, "%s: failed to parse coordinate data.\n",
> pInfo->name);
> +               LogMessageVerbSigSafe(X_ERROR, 0,
> +                                     "%s: failed to parse coordinate
> data.\n", pInfo->name);
>                 return -1;
>         }
>
> diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c
> index 0d1f950..d25608b 100644
> --- a/src/wcmTouchFilter.c
> +++ b/src/wcmTouchFilter.c
> @@ -248,7 +248,7 @@ void wcmGestureFilter(WacomDevicePtr priv, int channel)
>         if (!IsTouch(priv))
>         {
>                 /* this should never happen */
> -               xf86Msg(X_ERROR, "WACOM: No touch device found for %s \n",
> +               LogMessageVerbSigSafe(X_ERROR, 0, "WACOM: No touch device
> found for %s \n",
>                          common->device_path);
>                 return;
>         }
> diff --git a/src/wcmUSB.c b/src/wcmUSB.c
> index 76cc85d..db99271 100644
> --- a/src/wcmUSB.c
> +++ b/src/wcmUSB.c
> @@ -800,8 +800,8 @@ static void usbParseEvent(InputInfoPtr pInfo,
>         /* space left? bail if not. */
>         if (private->wcmEventCnt >= ARRAY_SIZE(private->wcmEvents))
>         {
> -               xf86Msg(X_ERROR, "%s: usbParse: Exceeded event queue (%d)
> \n",
> -                       pInfo->name, private->wcmEventCnt);
> +               LogMessageVerbSigSafe(X_ERROR, 0, "%s: usbParse: Exceeded
> event queue (%d) \n",
> +                                     pInfo->name, private->wcmEventCnt);
>                 private->wcmEventCnt = 0;
>                 return;
>         }
> @@ -832,8 +832,9 @@ static void usbParseSynEvent(InputInfoPtr pInfo,
>                  * but we never report a serial number with a value of 0 */
>                 if (event->value == 0)
>                 {
> -                       xf86Msg(X_ERROR, "%s: usbParse: Ignoring event
> from invalid serial 0\n",
> -                               pInfo->name);
> +                       LogMessageVerbSigSafe(X_ERROR, 0,
> +                                             "%s: usbParse: Ignoring
> event from invalid serial 0\n",
> +                                             pInfo->name);
>                         goto skipEvent;
>                 }
>
> @@ -1095,8 +1096,9 @@ static int mod_buttons(int buttons, int btn, int
> state)
>
>         if (btn >= sizeof(int) * 8)
>         {
> -               xf86Msg(X_ERROR, "%s: Invalid button number %d.
> Insufficient "
> -                               "storage\n", __func__, btn);
> +               LogMessageVerbSigSafe(X_ERROR, 0,
> +                                     "%s: Invalid button number %d.
> Insufficient storage\n",
> +                                     __func__, btn);
>                 return buttons;
>         }
>
> @@ -1555,8 +1557,9 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
>                                 channel_change |= 1;
>                         }
>                         else
> -                               xf86Msg(X_ERROR, "%s: rel event recv'd
> (%d)!\n",
> -                                       pInfo->name, event->code);
> +                               LogMessageVerbSigSafe(X_ERROR, 0,
> +                                                     "%s: rel event
> recv'd (%d)!\n",
> +                                                     pInfo->name,
> event->code);
>                 }
>                 else if (event->type == EV_KEY)
>                 {
> @@ -1579,8 +1582,9 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
>                 rc = ioctl(common->fd, EVIOCGKEY(sizeof(keys)), keys);
>                 if (rc == -1)
>                 {
> -                       xf86Msg(X_ERROR, "%s: failed to retrieve key
> bits\n",
> -                                       pInfo->name);
> +                       LogMessageVerbSigSafe(X_ERROR, 0,
> +                                             "%s: failed to retrieve key
> bits\n",
> +                                             pInfo->name);
>                         return;
>                 }
>
> diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
> index b04e06d..a984559 100644
> --- a/src/xf86Wacom.c
> +++ b/src/xf86Wacom.c
> @@ -686,7 +686,8 @@ void wcmReadPacket(InputInfoPtr pInfo)
>                 /* for all other errors, hope that the hotplugging code
> will
>                  * remove the device */
>                 if (errno != EAGAIN && errno != EINTR)
> -                       xf86Msg(X_ERROR, "%s: Error reading wacom device :
> %s\n", pInfo->name, strerror(errno));
> +                       LogMessageVerbSigSafe(X_ERROR, 0,
> +                                             "%s: Error reading wacom
> device : %s\n", pInfo->name, strerror(errno));
>                 return;
>         }
>
> diff --git a/src/xf86Wacom.h b/src/xf86Wacom.h
> index 639885e..12db4ab 100644
> --- a/src/xf86Wacom.h
> +++ b/src/xf86Wacom.h
> @@ -37,6 +37,11 @@
>  #include <xf86Xinput.h>
>  #include <mipointer.h>
>  #include <X11/Xatom.h>
> +
> +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 18
> +#define LogMessageVerbSigSafe xf86MsgVerb
> +#endif
> +
>
>  
> /*****************************************************************************
>   * Unit test hack
>
> ****************************************************************************/
> --
> 1.7.11.2
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net <javascript:;>
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to