Bug 11844 - Xserver ignores missing command-line given configuration file
Summary: Xserver ignores missing command-line given configuration file
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.2 (2007.02)
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-04 03:50 UTC by Brice Goglin
Modified: 2018-12-13 22:18 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
abort when command-line given config file is missing, and add a message when switching to auto-config (667 bytes, patch)
2007-08-04 03:51 UTC, Brice Goglin
no flags Details | Splinter Review

Description Brice Goglin 2007-08-04 03:50:38 UTC
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:
1) 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
2) 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.

Brice
Comment 1 Brice Goglin 2007-08-04 03:51:34 UTC
Created attachment 10989 [details] [review]
abort when command-line given config file is missing, and add a message when switching to auto-config
Comment 2 Jesse Adkins 2010-11-30 18:30:19 UTC
Can you make a patch generated by git format-patch, and send it to xorg-devel@lists.freedesktop.org? Patches made by git format-patch are easier to apply, and also preserve ownership (which may be useful to you later).

You can also CC me, to make sure I don't miss the patch.
Comment 3 GitLab Migration User 2018-12-13 22:18:13 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/355.


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.