[PATCH setxkbmap] Few messages added for easier troubleshooting.

Alan Coopersmith alan.coopersmith at oracle.com
Fri Feb 25 15:01:44 PST 2011


On 02/25/11 12:38 PM, Van de Bugger wrote:
> If setxkbmap fails to load rules file, it is not possible to find
> out where setxkbmap looks for it. Increasing verbosity level does
> not help:
> 
>     $ ./setxkbmap -v 10
>     Setting verbose level to 10
>     locale is C
>     Couldn't find rules file (evdev)
> 
> The problem fixed by adding two messages: before loading file and
> after successful loading. Messages are displayed if verbosity level
> is 8 or higher:
> 
>     $ ./setxkbmap -v 10
>     Setting verbose level to 10
>     locale is C
>     Trying to load rules file ./rules/evdev...
>     Trying to load rules file /usr/local/share/X11/xkb/rules/evdev...
>     Couldn't find rules file (evdev)

That certainly seems useful for troubleshooting.

> +XkbRF_RulesPtr
> +tryLoadRules(char *name, char *locale, Bool wantDesc, Bool wantRules)
> +{
> +    XkbRF_RulesPtr rules = NULL;
> +    VMSG1(7, "Trying to load rules file %s...\n", name);
> +    rules = XkbRF_Load(name, locale, wantDesc, wantRules);
> +    if (rules)
> +    {
> +        VMSG(7, "Success.\n");
> +    };

Extra ; after }


-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list