summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86Config.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-08-01 03:30:07 +0300
committerDaniel Stone <daniel@fooishbar.org>2007-08-01 03:33:06 +0300
commit0e0174d45ecbeb7b6dddc4af53da9d6211038e0e (patch)
treed8d8986874ff081997c528246a3bef983eada8eb /hw/xfree86/common/xf86Config.c
parentcd8e99e56ec5d02026e401cc15e0f8d75f2a4727 (diff)
XFree86: Allow disabling of HAL
If NoAutoAddDevices is given as a server flag, then no devices will be added from HAL events at all. If NoAutoEnableDevices is given, then the devices will be added (and the DevicePresenceNotify sent), but not enabled, thus leaving policy up to the client.
Diffstat (limited to 'hw/xfree86/common/xf86Config.c')
-rw-r--r--hw/xfree86/common/xf86Config.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 48c178b7d..3c29497e3 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -777,7 +777,9 @@ typedef enum {
FLAG_AIGLX,
FLAG_IGNORE_ABI,
FLAG_ALLOW_EMPTY_INPUT,
- FLAG_USE_DEFAULT_FONT_PATH
+ FLAG_USE_DEFAULT_FONT_PATH,
+ FLAG_AUTO_ADD_DEVICES,
+ FLAG_AUTO_ENABLE_DEVICES,
} FlagValues;
static OptionInfoRec FlagOptions[] = {
@@ -855,6 +857,10 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE },
{ FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN,
{0}, FALSE },
+ { FLAG_AUTO_ADD_DEVICES, "AutoAddDevices", OPTV_BOOLEAN,
+ {0}, TRUE },
+ { FLAG_AUTO_ENABLE_DEVICES, "AutoEnableDevices", OPTV_BOOLEAN,
+ {0}, TRUE },
{ -1, NULL, OPTV_NONE,
{0}, FALSE },
};
@@ -918,6 +924,30 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
xf86Msg(X_CONFIG, "Ignoring ABI Version\n");
}
+ if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) {
+ xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_DEVICES,
+ &xf86Info.autoAddDevices);
+ from = X_CONFIG;
+ }
+ else {
+ xf86Info.autoAddDevices = TRUE;
+ from = X_DEFAULT;
+ }
+ xf86Msg(from, "%sutomatically adding devices\n",
+ xf86Info.autoAddDevices ? "A" : "Not a");
+
+ if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ENABLE_DEVICES)) {
+ xf86GetOptValBool(FlagOptions, FLAG_AUTO_ENABLE_DEVICES,
+ &xf86Info.autoEnableDevices);
+ from = X_CONFIG;
+ }
+ else {
+ xf86Info.autoEnableDevices = TRUE;
+ from = X_DEFAULT;
+ }
+ xf86Msg(from, "%sutomatically enabling devices\n",
+ xf86Info.autoEnableDevices ? "A" : "Not a");
+
/*
* Set things up based on the config file information. Some of these
* settings may be overridden later when the command line options are