[PATCH 4/5] xfree86: Remove %M expansion from config parser

Adam Jackson ajax at redhat.com
Thu Oct 14 12:13:27 PDT 2010


This was to distinguish XFree86 3.x files from XFree86 4.x files.  It
never really made sense to be looking for xorg.conf-4.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/common/xf86Config.c       |   12 ++++++------
 hw/xfree86/doc/man/xorg.conf.man.pre |    6 ------
 hw/xfree86/parser/scan.c             |   14 --------------
 3 files changed, 6 insertions(+), 26 deletions(-)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index a63f487..0370643 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -78,19 +78,19 @@ extern DeviceAssocRec mouse_assoc;
 			"/etc/X11/%R," "%P/etc/X11/%R," \
 			"%E," "%F," \
 			"/etc/X11/%F," "%P/etc/X11/%F," \
-			"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
-			"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
+			"/etc/X11/%X," "/etc/%X," \
+			"%P/etc/X11/%X.%H," \
 			"%P/etc/X11/%X," \
-			"%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
+			"%P/lib/X11/%X.%H," \
 			"%P/lib/X11/%X"
 #endif
 #ifndef USER_CONFIGPATH
 #define USER_CONFIGPATH	"/etc/X11/%S," "%P/etc/X11/%S," \
 			"/etc/X11/%G," "%P/etc/X11/%G," \
-			"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
-			"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
+			"/etc/X11/%X," "/etc/%X," \
+			"%P/etc/X11/%X.%H," \
 			"%P/etc/X11/%X," \
-			"%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
+			"%P/lib/X11/%X.%H," \
 			"%P/lib/X11/%X"
 #endif
 #ifndef ROOT_CONFIGDIRPATH
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 6b3636f..cbfea7d 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -39,14 +39,11 @@ server is started as a normal user:
 .IR __projectroot__/etc/X11/ <cmdline>
 .IB /etc/X11/ $XORGCONFIG
 .IB __projectroot__/etc/X11/ $XORGCONFIG
-.I /etc/X11/__xconfigfile__\-4
 .I /etc/X11/__xconfigfile__
 .I /etc/__xconfigfile__
 .IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
-.I __projectroot__/etc/X11/__xconfigfile__\-4
 .I __projectroot__/etc/X11/__xconfigfile__
 .IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
-.I __projectroot__/lib/X11/__xconfigfile__\-4
 .I __projectroot__/lib/X11/__xconfigfile__
 .fi
 .RE
@@ -74,14 +71,11 @@ search locations are as follows:
 .B $XORGCONFIG
 .IB /etc/X11/ $XORGCONFIG
 .IB __projectroot__/etc/X11/ $XORGCONFIG
-.I /etc/X11/__xconfigfile__\-4
 .I /etc/X11/__xconfigfile__
 .I /etc/__xconfigfile__
 .IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
-.I __projectroot__/etc/X11/__xconfigfile__\-4
 .I __projectroot__/etc/X11/__xconfigfile__
 .IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
-.I __projectroot__/lib/X11/__xconfigfile__\-4
 .I __projectroot__/lib/X11/__xconfigfile__
 .fi
 .RE
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 97cd79c..e4fce30 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -554,7 +554,6 @@ xf86pathIsSafe(const char *path)
  *    %P    projroot
  *    %C    sysconfdir
  *    %D    datadir
- *    %M    config file format version number
  *    %%    %
  */
 
@@ -579,11 +578,6 @@ xf86pathIsSafe(const char *path)
 #ifndef XCONFENV
 #define XCONFENV	"XORGCONFIG"
 #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 {									\
 							free(result);				\
@@ -614,7 +608,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
 	int i, l;
 	static const char *env = NULL;
 	static char *hostname = NULL;
-	static char majorvers[3] = "";
 
 	if (!template)
 		return NULL;
@@ -715,13 +708,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
 			case 'D':
 				APPEND_STR(DATADIR);
 				break;
-			case 'M':
-				if (!majorvers[0]) {
-					snprintf(majorvers, sizeof(majorvers),
-						 "%d", CONFIG_FILE_VERSION);
-				}
-				APPEND_STR(majorvers);
-				break;
 			case '%':
 				result[l++] = '%';
 				CHECK_LENGTH;
-- 
1.7.2.3



More information about the xorg-devel mailing list