xfree86: Add Option "Debug" to ServerFlags

This provides a generic way to control obscure runtime behavior knobs
without making interface promises.

Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2018-03-28 12:46:00 -04:00
parent c95361465e
commit df13ea7da9
3 changed files with 10 additions and 0 deletions

View File

@ -645,6 +645,7 @@ typedef enum {
FLAG_AUTO_ADD_GPU,
FLAG_MAX_CLIENTS,
FLAG_IGLX,
FLAG_DEBUG,
} FlagValues;
/**
@ -702,6 +703,8 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE },
{FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN,
{0}, FALSE},
{FLAG_DEBUG, "Debug", OPTV_STRING,
{0}, FALSE},
{-1, NULL, OPTV_NONE,
{0}, FALSE},
};
@ -850,6 +853,8 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
}
#endif
xf86Info.debug = xf86GetOptValString(FlagOptions, FLAG_DEBUG);
/* if we're not hotplugging, force some input devices to exist */
xf86Info.forceInputDevices = !(xf86Info.autoAddDevices &&
xf86Info.autoEnableDevices);

View File

@ -97,6 +97,7 @@ typedef struct {
MessageType dri2From;
Bool autoAddGPU;
const char *debug;
} xf86InfoRec, *xf86InfoPtr;
/* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */

View File

@ -495,6 +495,10 @@ Options with command line equivalents are overridden when their command
line equivalent is used.
The options recognised by this section are:
.TP 7
.BI "Option \*qDebug\*q \*q" string \*q
This comma-separated list provides a way to control various debugging switches
from the config file.
.TP 7
.BI "Option \*qDefaultServerLayout\*q \*q" layout\-id \*q
This specifies the default
.B ServerLayout