From: Lars-Peter Clausen Date: Sun, 1 Feb 2009 16:14:02 +0000 (+0000) Subject: Some stability and cleanup patches. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0c40fd8cfef011693923c714086fc17bc2c13274;p=openwrt%2Fsvn-archive%2Farchive.git Some stability and cleanup patches. SVN-Revision: 14341 --- diff --git a/Xorg/driver/xf86-input-tslib/patches/010-rename-tslibdevice-option-to-device.patch b/Xorg/driver/xf86-input-tslib/patches/010-rename-tslibdevice-option-to-device.patch new file mode 100644 index 0000000000..dd36fa2e9e --- /dev/null +++ b/Xorg/driver/xf86-input-tslib/patches/010-rename-tslibdevice-option-to-device.patch @@ -0,0 +1,29 @@ +commit fe65976e2f006643950e70d33684b91c33a87e3a +Author: Lars-Peter Clausen +Date: Sun Feb 1 16:42:27 2009 +0100 + + Rename "TslibDevice" option to "Device" to be more consistant with other + drivers. + +diff --git a/src/tslib.c b/src/tslib.c +index edc14b2..e91a949 100644 +--- a/src/tslib.c ++++ b/src/tslib.c +@@ -73,7 +73,7 @@ struct ts_priv { + }; + + static const char *DEFAULTS[] = { +- "TslibDevice", "/dev/event0", ++ "Device", "/dev/event0", + NULL + }; + +@@ -334,7 +334,7 @@ xf86TslibInit(InputDriverPtr drv, IDevPtr dev, int flags) + priv->rotate = TSLIB_ROTATE_NONE; + } + +- s = xf86SetStrOption(pInfo->options, "TslibDevice", NULL); ++ s = xf86SetStrOption(pInfo->options, "Device", NULL); + + priv->ts = ts_open(s, 0); + if (!priv->ts) { diff --git a/Xorg/driver/xf86-input-tslib/patches/011-ifdef-debug-output.patch b/Xorg/driver/xf86-input-tslib/patches/011-ifdef-debug-output.patch new file mode 100644 index 0000000000..83b2bc5a4c --- /dev/null +++ b/Xorg/driver/xf86-input-tslib/patches/011-ifdef-debug-output.patch @@ -0,0 +1,58 @@ +commit 69fcc78ea931f8a84497f4ee9021f4493f45a778 +Author: Lars-Peter Clausen +Date: Sun Feb 1 16:44:24 2009 +0100 + + Put #ifdef DEBUG around debug output. + +diff --git a/src/tslib.c b/src/tslib.c +index e91a949..ad43abb 100644 +--- a/src/tslib.c ++++ b/src/tslib.c +@@ -80,21 +80,27 @@ static const char *DEFAULTS[] = { + static void + BellProc(int percent, DeviceIntPtr pDev, pointer ctrl, int unused) + { ++#ifdef DEBUG + ErrorF("%s\n", __FUNCTION__); ++#endif + return; + } + + static void + KeyControlProc(DeviceIntPtr pDev, KeybdCtrl * ctrl) + { ++#ifdef DEBUG + ErrorF("%s\n", __FUNCTION__); ++#endif + return; + } + + static void + PointerControlProc(DeviceIntPtr dev, PtrCtrl * ctrl) + { ++#ifdef DEBUG + ErrorF("%s\n", __FUNCTION__); ++#endif + return; + } + +@@ -186,7 +192,9 @@ xf86TslibControlProc(DeviceIntPtr device, int what) + int i; + struct ts_priv *priv; + ++#ifdef DEBUG + ErrorF("%s\n", __FUNCTION__); ++#endif + pInfo = device->public.devicePrivate; + priv = pInfo->private; + +@@ -258,7 +266,9 @@ xf86TslibControlProc(DeviceIntPtr device, int what) + static void + xf86TslibUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + { ++#ifdef DEBUG + ErrorF("%s\n", __FUNCTION__); ++#endif + xf86TslibControlProc(pInfo->dev, DEVICE_OFF); + xfree(pInfo->private); + } diff --git a/Xorg/driver/xf86-input-tslib/patches/012-deleteinput.patch b/Xorg/driver/xf86-input-tslib/patches/012-deleteinput.patch new file mode 100644 index 0000000000..b8460d3812 --- /dev/null +++ b/Xorg/driver/xf86-input-tslib/patches/012-deleteinput.patch @@ -0,0 +1,39 @@ +commit de4ec145ea88253dc469ee81f094fa73de36b773 +Author: Lars-Peter Clausen +Date: Sun Feb 1 16:54:55 2009 +0100 + + Call xf86DeleteInput in UnInit or if something goes wrong in the Init procedure. + If xf86DeleteInput is not called the server will end up with corrupted memory. + +diff --git a/src/tslib.c b/src/tslib.c +index ad43abb..3eba078 100644 +--- a/src/tslib.c ++++ b/src/tslib.c +@@ -271,6 +271,7 @@ xf86TslibUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + #endif + xf86TslibControlProc(pInfo->dev, DEVICE_OFF); + xfree(pInfo->private); ++ xf86DeleteInput(pInfo, 0); + } + + /* +@@ -347,15 +348,17 @@ xf86TslibInit(InputDriverPtr drv, IDevPtr dev, int flags) + s = xf86SetStrOption(pInfo->options, "Device", NULL); + + priv->ts = ts_open(s, 0); ++ xfree(s); ++ + if (!priv->ts) { + ErrorF("ts_open failed (device=%s)\n",s); ++ xf86DeleteInput(pInfo, 0); + return NULL; + } + +- xfree(s); +- + if (ts_config(priv->ts)) { + ErrorF("ts_config failed\n"); ++ xf86DeleteInput(pInfo, 0); + return NULL; + } +