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:
parent
f8ec71603c
commit
a77458486a
|
@ -78,19 +78,19 @@ extern DeviceAssocRec mouse_assoc;
|
||||||
"/etc/X11/%R," "%P/etc/X11/%R," \
|
"/etc/X11/%R," "%P/etc/X11/%R," \
|
||||||
"%E," "%F," \
|
"%E," "%F," \
|
||||||
"/etc/X11/%F," "%P/etc/X11/%F," \
|
"/etc/X11/%F," "%P/etc/X11/%F," \
|
||||||
"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
|
"/etc/X11/%X," "/etc/%X," \
|
||||||
"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
|
"%P/etc/X11/%X.%H," \
|
||||||
"%P/etc/X11/%X," \
|
"%P/etc/X11/%X," \
|
||||||
"%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
|
"%P/lib/X11/%X.%H," \
|
||||||
"%P/lib/X11/%X"
|
"%P/lib/X11/%X"
|
||||||
#endif
|
#endif
|
||||||
#ifndef USER_CONFIGPATH
|
#ifndef USER_CONFIGPATH
|
||||||
#define USER_CONFIGPATH "/etc/X11/%S," "%P/etc/X11/%S," \
|
#define USER_CONFIGPATH "/etc/X11/%S," "%P/etc/X11/%S," \
|
||||||
"/etc/X11/%G," "%P/etc/X11/%G," \
|
"/etc/X11/%G," "%P/etc/X11/%G," \
|
||||||
"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
|
"/etc/X11/%X," "/etc/%X," \
|
||||||
"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
|
"%P/etc/X11/%X.%H," \
|
||||||
"%P/etc/X11/%X," \
|
"%P/etc/X11/%X," \
|
||||||
"%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
|
"%P/lib/X11/%X.%H," \
|
||||||
"%P/lib/X11/%X"
|
"%P/lib/X11/%X"
|
||||||
#endif
|
#endif
|
||||||
#ifndef ROOT_CONFIGDIRPATH
|
#ifndef ROOT_CONFIGDIRPATH
|
||||||
|
|
|
@ -39,14 +39,11 @@ server is started as a normal user:
|
||||||
.IR __projectroot__/etc/X11/ <cmdline>
|
.IR __projectroot__/etc/X11/ <cmdline>
|
||||||
.IB /etc/X11/ $XORGCONFIG
|
.IB /etc/X11/ $XORGCONFIG
|
||||||
.IB __projectroot__/etc/X11/ $XORGCONFIG
|
.IB __projectroot__/etc/X11/ $XORGCONFIG
|
||||||
.I /etc/X11/__xconfigfile__\-4
|
|
||||||
.I /etc/X11/__xconfigfile__
|
.I /etc/X11/__xconfigfile__
|
||||||
.I /etc/__xconfigfile__
|
.I /etc/__xconfigfile__
|
||||||
.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
|
.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
|
||||||
.I __projectroot__/etc/X11/__xconfigfile__\-4
|
|
||||||
.I __projectroot__/etc/X11/__xconfigfile__
|
.I __projectroot__/etc/X11/__xconfigfile__
|
||||||
.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
|
.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
|
||||||
.I __projectroot__/lib/X11/__xconfigfile__\-4
|
|
||||||
.I __projectroot__/lib/X11/__xconfigfile__
|
.I __projectroot__/lib/X11/__xconfigfile__
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
@ -74,14 +71,11 @@ search locations are as follows:
|
||||||
.B $XORGCONFIG
|
.B $XORGCONFIG
|
||||||
.IB /etc/X11/ $XORGCONFIG
|
.IB /etc/X11/ $XORGCONFIG
|
||||||
.IB __projectroot__/etc/X11/ $XORGCONFIG
|
.IB __projectroot__/etc/X11/ $XORGCONFIG
|
||||||
.I /etc/X11/__xconfigfile__\-4
|
|
||||||
.I /etc/X11/__xconfigfile__
|
.I /etc/X11/__xconfigfile__
|
||||||
.I /etc/__xconfigfile__
|
.I /etc/__xconfigfile__
|
||||||
.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
|
.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
|
||||||
.I __projectroot__/etc/X11/__xconfigfile__\-4
|
|
||||||
.I __projectroot__/etc/X11/__xconfigfile__
|
.I __projectroot__/etc/X11/__xconfigfile__
|
||||||
.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
|
.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
|
||||||
.I __projectroot__/lib/X11/__xconfigfile__\-4
|
|
||||||
.I __projectroot__/lib/X11/__xconfigfile__
|
.I __projectroot__/lib/X11/__xconfigfile__
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
|
|
@ -554,7 +554,6 @@ xf86pathIsSafe(const char *path)
|
||||||
* %P projroot
|
* %P projroot
|
||||||
* %C sysconfdir
|
* %C sysconfdir
|
||||||
* %D datadir
|
* %D datadir
|
||||||
* %M config file format version number
|
|
||||||
* %% %
|
* %% %
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -579,11 +578,6 @@ xf86pathIsSafe(const char *path)
|
||||||
#ifndef XCONFENV
|
#ifndef XCONFENV
|
||||||
#define XCONFENV "XORGCONFIG"
|
#define XCONFENV "XORGCONFIG"
|
||||||
#endif
|
#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 { \
|
#define BAIL_OUT do { \
|
||||||
free(result); \
|
free(result); \
|
||||||
|
@ -614,7 +608,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
|
||||||
int i, l;
|
int i, l;
|
||||||
static const char *env = NULL;
|
static const char *env = NULL;
|
||||||
static char *hostname = NULL;
|
static char *hostname = NULL;
|
||||||
static char majorvers[3] = "";
|
|
||||||
|
|
||||||
if (!template)
|
if (!template)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -715,13 +708,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
|
||||||
case 'D':
|
case 'D':
|
||||||
APPEND_STR(DATADIR);
|
APPEND_STR(DATADIR);
|
||||||
break;
|
break;
|
||||||
case 'M':
|
|
||||||
if (!majorvers[0]) {
|
|
||||||
snprintf(majorvers, sizeof(majorvers),
|
|
||||||
"%d", CONFIG_FILE_VERSION);
|
|
||||||
}
|
|
||||||
APPEND_STR(majorvers);
|
|
||||||
break;
|
|
||||||
case '%':
|
case '%':
|
||||||
result[l++] = '%';
|
result[l++] = '%';
|
||||||
CHECK_LENGTH;
|
CHECK_LENGTH;
|
||||||
|
|
Loading…
Reference in New Issue