Having them in wcmParseOptions() means we don't get debug messages until we hit wcmParseOptions(). For new devices that don't initialize (for whatever reason) this makes debugging a lot harder.
Signed-off-by: Peter Hutterer <[email protected]> --- src/wcmConfig.c | 4 ++++ src/wcmValidateDevice.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wcmConfig.c b/src/wcmConfig.c index 22f162a..94b188d 100644 --- a/src/wcmConfig.c +++ b/src/wcmConfig.c @@ -506,6 +506,8 @@ static int wcmPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) priv = (WacomDevicePtr) pInfo->private; priv->common->device_path = device; priv->name = pInfo->name; + priv->debugLevel = xf86SetIntOption(pInfo->options, + "DebugLevel", priv->debugLevel); /* check if the same device file has been added already */ if (wcmIsDuplicate(device, pInfo)) @@ -523,6 +525,8 @@ static int wcmPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) /* initialize supported keys with the first tool on the port */ wcmDeviceTypeKeys(pInfo); + common->debugLevel = xf86SetIntOption(pInfo->options, + "CommonDBG", common->debugLevel); oldname = pInfo->name; if (wcmIsHotpluggedDevice(pInfo)) diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c index e0a78d9..a604806 100644 --- a/src/wcmValidateDevice.c +++ b/src/wcmValidateDevice.c @@ -688,10 +688,6 @@ Bool wcmParseOptions(InputInfoPtr pInfo, Bool is_primary, Bool is_dependent) int tpc_button_is_on; /* Optional configuration */ - priv->debugLevel = xf86SetIntOption(pInfo->options, - "DebugLevel", priv->debugLevel); - common->debugLevel = xf86SetIntOption(pInfo->options, - "CommonDBG", common->debugLevel); s = xf86SetStrOption(pInfo->options, "Mode", NULL); if (s && (xf86NameCmp(s, "absolute") == 0)) -- 1.7.6 ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
