Xserver ignores missing command-line given configuration file
Submitted by Brice Goglin
Assigned to Xorg Project Team
Reported by Frederik Eaton on the Debian BTS several months ago.
When a config file is given on the command line but does not exist, the Xserver displays an error but does not exit. It just switches to autoconfiguration (without being very clear in the log). It does not look like an acceptable behavior to Frederik (and me). It brings confusion since people might think their custom config file works, while actually the server only started thanks to autoconfig.
The following tiny patch fixes this by:
- reporting an error when xf86HandleConfigFile returns CONFIG_NOFILE and xf86ConfigFile was set: (EE) Unable to locate/open config file: "dummy" (EE) Command-line given config file "dummy" not found
- printing a message when xf86ConfigFile wasn't set to show that we switch to autoconfiguration: (EE) Unable to locate/open config file (==) Default config file missing, switching to auto-configuration New driver is "i810" (==) Using default built-in configuration (55 lines)
It applies to both Xserver 1.3 and current git. I only tested it on 1.3. I don't know whether it is acceptable to commit before the code freeze, I am posting all this here so that it doesn't get lost.
Version: 7.2 (2007.02)