xfree86: Remove %M expansion from config parser

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.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2010-10-14 14:00:53 -04:00
parent f8ec71603c
commit a77458486a
3 changed files with 6 additions and 26 deletions

View File

@ -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

View File

@ -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

View File

@ -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;