summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-06-03 18:59:03 -0700
committerKeith Packard <keithp@keithp.com>2010-06-04 00:22:54 -0700
commit01c75522b6ed15e979347acd38e234e2cb9006c3 (patch)
treea62a79fc6f7b5fe81343e82c2bd85ef5bffec1cc /hw
parent7f19a7a6e90a4fd7b7ec0256974f62e575218541 (diff)
Stop searching for XF86Config files
xorg.conf has been used since the X11R6.7 release in April 2004. 6 years has been a generous transition period for users to "mv XF86Config xorg.conf" and for distros to update their configuration tools and packages. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: James Cloos <cloos@jhcloos.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/doc/sgml/DESIGN.xml5
-rw-r--r--hw/xfree86/parser/scan.c23
2 files changed, 10 insertions, 18 deletions
diff --git a/hw/xfree86/doc/sgml/DESIGN.xml b/hw/xfree86/doc/sgml/DESIGN.xml
index 826a9702c..6c90a4011 100644
--- a/hw/xfree86/doc/sgml/DESIGN.xml
+++ b/hw/xfree86/doc/sgml/DESIGN.xml
@@ -118,8 +118,9 @@ routines common to all the X servers in the sample implementation.
<title>The xorg.conf File</title>
<para>
-The xorg.conf file format is similar to the old format, with the following
-changes:
+The xorg.conf file format is based on the XF86Config format from XFree86 4.4,
+which is in turn similar to the old XFree86 3.x XF86Config format, with the
+following changes:
</para>
<sect2>
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 06710d55a..9771913f4 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -601,7 +601,7 @@ xf86pathIsSafe(const char *path)
* %P projroot
* %C sysconfdir
* %D datadir
- * %M major version number
+ * %M config file format version number
* %% %
*/
@@ -627,16 +627,10 @@ xf86pathIsSafe(const char *path)
#define XCONFENV "XORGCONFIG"
#endif
#define XFREE86CFGFILE "XF86Config"
-#ifndef XF86_VERSION_MAJOR
-#ifdef XVERSION
-#if XVERSION > 40000000
-#define XF86_VERSION_MAJOR (XVERSION / 10000000)
-#else
-#define XF86_VERSION_MAJOR (XVERSION / 1000)
-#endif
-#else
-#define XF86_VERSION_MAJOR 4
-#endif
+/* xorg.conf is based on XF86Config version 4. If we ever break
+ compatibility of the xorg.conf syntax, we'll bump this version number. */
+#ifndef CONFIG_FILE_VERSION
+#define CONFIG_FILE_VERSION 4
#endif
#define BAIL_OUT do { \
@@ -771,11 +765,8 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
break;
case 'M':
if (!majorvers[0]) {
- if (XF86_VERSION_MAJOR < 0 || XF86_VERSION_MAJOR > 99) {
- fprintf(stderr, "XF86_VERSION_MAJOR is out of range\n");
- BAIL_OUT;
- } else
- sprintf(majorvers, "%d", XF86_VERSION_MAJOR);
+ snprintf(majorvers, sizeof(majorvers),
+ "%d", CONFIG_FILE_VERSION);
}
APPEND_STR(majorvers);
break;