From 5996eafa6396f833a539051b6cf784973336c80a Mon Sep 17 00:00:00 2001 From: Paulo Ricardo Zanoni <pzanoni@mandriva.com> Date: Fri, 23 Oct 2009 13:33:42 -0200 Subject: [PATCH 904/908] Add noAutoDevices command line option --- hw/xfree86/common/xf86.h | 1 + hw/xfree86/common/xf86Config.c | 6 +++++- hw/xfree86/common/xf86Globals.c | 1 + hw/xfree86/common/xf86Init.c | 6 ++++++ 4 files changed, 13 insertions(+), 1 deletions(-) diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 54332e3..6e4fc2f 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -80,6 +80,7 @@ extern _X_EXPORT confDRIRec xf86ConfigDR extern _X_EXPORT Bool xf86DRI2Enabled(void); extern _X_EXPORT Bool VTSwitchEnabled; /* kbd driver */ +extern _X_EXPORT Bool xf86AutoAddDevices; #define XF86SCRNINFO(p) xf86ScreenToScrn(p) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 58b30dd..ecdbdb2 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -835,7 +835,11 @@ configServerFlags(XF86ConfFlagsPtr flags xf86Info.useSIGIO = FALSE; } - if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) { + if (xf86AutoAddDevices == FALSE) { + xf86Info.autoAddDevices = FALSE; + from = X_CMDLINE; + } + else if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) { xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_DEVICES, &xf86Info.autoAddDevices); from = X_CONFIG; diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index 16d5557..84ac29c 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -160,6 +160,7 @@ InputDriverPtr *xf86InputDriverList = NU int xf86NumInputDrivers = 0; int xf86NumScreens = 0; int xf86NumGPUScreens = 0; +Bool xf86AutoAddDevices = TRUE; const char *xf86VisualNames[] = { "StaticGray", diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 71926f8..02c0ef3 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1400,6 +1400,10 @@ ddxProcessArgument(int argc, char **argv return 1; } + if (!strcmp(argv[i], "-noAutoAddDevices")) { + xf86AutoAddDevices = FALSE; + return 1; + } /* OS-specific processing */ return xf86ProcessArgument(argc, argv, i); } @@ -1472,6 +1476,7 @@ ddxUseMsg(void) ErrorF ("-novtswitch don't automatically switch VT at reset & exit\n"); ErrorF("-sharevts share VTs with another X server\n"); + ErrorF("-noAutoAddDevices do not add devices through HAL events\n"); /* OS-specific usage */ xf86UseMsg(); ErrorF("\n"); -- 1.7.6