diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2010-04-03 10:08:25 -0700 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-04-08 15:21:01 +1000 |
commit | 95f01bdfee8241371675f0089170fa6b2908d815 (patch) | |
tree | ef6632fdea7c4d27cc3b0f7242649292656ffd90 /hw/xfree86/common | |
parent | a1bae63dc634a5a79861eab128c63506081f7ed9 (diff) |
xfree86: Search for a system xorg.conf.d
In addition to the conf files found in /etc/X11 or $sysconfdir/X11 used
for local administration, we also reserve a system directory for vendor
and package usage. The simple search path is:
/usr/share/X11/xorg.conf.d
$datadir/X11/xorg.conf.d
Files from these directories will have the lowest config priority. The
directory $datadir/X11/xorg.conf.d is exported from xorg-server.pc in
the variable "sysconfigdir". Packages should install their .conf files
to the directory specified by:
`pkg-config --variable=sysconfigdir xorg-server`
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/xfree86/common')
-rw-r--r-- | hw/xfree86/common/xf86Config.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index d02c22ac1..1e9543fa2 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -104,6 +104,9 @@ extern DeviceAssocRec mouse_assoc; #define USER_CONFIGDIRPATH "/etc/X11/%R," "%C/X11/%R," \ "/etc/X11/%X," "%C/X11/%X" #endif +#ifndef SYS_CONFIGDIRPATH +#define SYS_CONFIGDIRPATH "/usr/share/X11/%X," "%D/X11/%X" +#endif #ifndef PROJECTROOT #define PROJECTROOT "/usr/X11R6" #endif @@ -2421,7 +2424,7 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) { ConfigStatus xf86HandleConfigFile(Bool autoconfig) { - const char *filename, *dirname; + const char *filename, *dirname, *sysdirname; char *filesearch, *dirsearch; MessageType filefrom = X_DEFAULT; MessageType dirfrom = X_DEFAULT; @@ -2444,6 +2447,8 @@ xf86HandleConfigFile(Bool autoconfig) dirfrom = X_CMDLINE; xf86initConfigFiles(); + sysdirname = xf86openConfigDirFiles(SYS_CONFIGDIRPATH, NULL, + PROJECTROOT); dirname = xf86openConfigDirFiles(dirsearch, xf86ConfigDir, PROJECTROOT); filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT); if (filename) { @@ -2464,7 +2469,10 @@ xf86HandleConfigFile(Bool autoconfig) "Unable to locate/open config directory: \"%s\"\n", xf86ConfigDir); } - if (!filename && !dirname) + if (sysdirname) + xf86MsgVerb(X_DEFAULT, 0, "Using system config directory \"%s\"\n", + sysdirname); + if (!filename && !dirname && !sysdirname) return CONFIG_NOFILE; } |