[PULL] udev input-hotplug backend

Stephan Raue mailinglists at openelec.tv
Fri Jan 1 14:58:16 PST 2010


Hi Dan,

i have tested your patch, but it doesnt work:

my configfiles (both without empty line as last line):

$ cat /etc/X11/xorg.conf.d/98-input-synaptics.conf
Section "InputClass"
     Identifier "synaptics"
     MatchIsTouchpad "true"
     Driver "synaptics"
EndSection

$ cat /etc/X11/xorg.conf.d/99-input-default.conf
Section "InputClass"
     Identifier "default"
     Driver "evdev"
EndSection

Xorg.log without patch:

[0 sec: 000207 usec](==) Log file: "/var/log/Xorg.0.0.log", Time: Fri 
Jan  1 22:38:04 2010
[0 sec: 000844 usec](==) Using config directory: "/etc/X11/xorg.conf.d"
[0 sec: 000896 usec]Parse error on line 1 of section InputClass in file 
/etc/X11/xorg.conf.d/99-input-default.conf
     [0 sec: 000903 usec]"EndSectionSection" is not a valid keyword in 
this section.[0 sec: 000908 usec]
[0 sec: 000924 usec](EE) Problem parsing the config file
[0 sec: 000931 usec](EE) Error parsing the config file
[0 sec: 000936 usec]
Fatal server error:
[0 sec: 000940 usec]no screens found[0 sec: 000945 usec]
[0 sec: 000949 usec]
Please consult the The X.Org Foundation support
      at http://wiki.x.org
  for help.
[0 sec: 000954 usec]Please also check the log file at 
"/var/log/Xorg.0.0.log" for additional information.

Xorg.log with your patch:

[0 sec: 000196 usec](==) Log file: "/var/log/Xorg.0.0.log", Time: Fri 
Jan  1 22:48:30 2010
[0 sec: 024733 usec](==) Using config directory: "/etc/X11/xorg.conf.d"
[0 sec: 024795 usec]Parse error on line 4 of section InputClass in file 
/etc/X11/xorg.conf.d/98-input-synaptics.conf
     [0 sec: 024803 usec]Unexpected EOF. Missing EndSection keyword?[0 
sec: 024807 usec]
[0 sec: 024824 usec](EE) Problem parsing the config file
[0 sec: 024831 usec](EE) Error parsing the config file
[0 sec: 024836 usec]
Fatal server error:
[0 sec: 024840 usec]no screens found[0 sec: 024845 usec]
[0 sec: 024849 usec]
Please consult the The X.Org Foundation support
      at http://wiki.x.org
  for help.
[0 sec: 024854 usec]Please also check the log file at 
"/var/log/Xorg.0.0.log" for additional information.

greetings

Stephan

Am 01.01.2010 21:23, schrieb Dan Nicholson:
> On Fri, Jan 01, 2010 at 07:48:30PM +0100, Stephan Raue wrote:
>    
>> Am 01.01.2010 19:13, schrieb Dan Nicholson:
>>      
>>> On Fri, Jan 1, 2010 at 7:38 AM, Stephan Raue<mailinglists at openelec.tv>   wrote:
>>>        
>>>> another little issue i have found in the implementation of xorg.conf.d:
>>>>
>>>> if i have configfiles without an empty last line there are errors
>>>> because the first line of the second configfile will be parsed with the
>>>> last line of the first config file.
>>>>
>>>>          
>>> Wow, good to know. I guess my editor always ends the files with
>>> newlines. I'll have to take a look at it.
>>>
>>>
>>>        
>> thank you :-) and thank you for our good work :-)
>>      
> Can you try the patch below? I haven't built or tested it (upgrading my
> system right now), but I think it should do the right thing.
>
> --
> Dan
>
>  From 16902d9960518c2ac54199440746e77ff6cb93f5 Mon Sep 17 00:00:00 2001
> From: Dan Nicholson<dbn.lists at gmail.com>
> Date: Fri, 1 Jan 2010 11:58:03 -0800
> Subject: [PATCH] xfree86: Return non-NULL when reaching EOF with more files to parse
>
> The config parser is line based, so it has to return when reaching EOF
> just like when reaching EOL. In order to signal that there are still
> files to parse, non-NULL must be returned. Previously, the parser was
> just moving to the first line of the next file and continuing without
> returning to the caller. This only works when each file ends in an empty
> line.
>
> Signed-off-by: Dan Nicholson<dbn.lists at gmail.com>
> ---
>   hw/xfree86/parser/scan.c |   15 +++++++++------
>   1 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
> index b80fbfb..b26b6f6 100644
> --- a/hw/xfree86/parser/scan.c
> +++ b/hw/xfree86/parser/scan.c
> @@ -226,14 +226,17 @@ xf86getNextLine(void)
>   		ret = fgets(configBuf + pos, configBufLen - pos - 1,
>   			    configFiles[curFileIndex].file);
>
> +		/*
> +		 * If we've reached EOF, prepare for the next file and don't
> +		 * return NULL. Otherwise, just reset the index for parsing.
> +		 */
>   		if (!ret) {
> -			/* stop if there are no more files */
> -			if (++curFileIndex>= numFiles) {
> +			if (++curFileIndex<  numFiles) {
> +				ret = configBuf;
> +				configLineNo = 0;
> +			} else
>   				curFileIndex = 0;
> -				break;
> -			}
> -			configLineNo = 0;
> -			continue;
> +			break;
>   		}
>
>   		/* search for EOL in the new block of chars */
>    


-- 
               ### OpenELEC.tv ###
The free and open Mediacenter Distribution 4 you
              http://www.openelec.tv



More information about the xorg-devel mailing list