Bug 10770 - parser lib error when generating xorg.conf file
Summary: parser lib error when generating xorg.conf file
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.2 (2007.02)
Hardware: All All
: low minor
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-26 07:27 UTC by Patrick Filion
Modified: 2007-06-28 13:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Patrick Filion 2007-04-26 07:27:02 UTC
Hi,
I've found a minor problem in the xserver parser library (./hw/xfree86/parser/)

The Files.c contains an error which causes the InputDevices section not being printed out to file proprely.  The last "InputDevices" is always printed out as Inputdevs instead of InputDevices.  So using this library generated an error in the config file using a wrong keyword ( probably an old one )

Output example :

        many other InputDevices ...
	InputDevices   "/dev/input/event0"
	InputDevices   "/dev/pointer0"
	InputDevices   "/dev/pointer1"
	InputDevices   "/dev/pointer2"
==>	Inputdevs   "/dev/pointer3"
        FontPath     "/usr/X11R6/lib/X11/fonts/misc:unscaled"
        etc ...

Here's the code :

Files.c:248
void
xf86printFileSection (FILE * cf, XF86ConfFilesPtr ptr)

in function : 

if (ptr->file_inputdevs)
	{
		s = ptr->file_inputdevs;
		p = index (s, ',');
		while (p)
		{
			*p = '\000';
			fprintf (cf, "\tInputDevices   \"%s\"\n", s);
			*p = ',';
			s = p;
			s++;
			p = index (s, ',');
		}
===>		fprintf (cf, "\tInputdevs   \"%s\"\n", s);
	}

Solution :
You can fix it by changing Inputdevs to InputDevices after the while loop. (Line 261)

As I said, it's a small bug. I found it, why not report it ...
Comment 1 Adam Jackson 2007-06-28 13:47:30 UTC
Fixed in head, thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.