diff options
author | marha <marha@users.sourceforge.net> | 2011-11-25 08:32:21 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-11-25 08:32:21 +0100 |
commit | 849d328b25c2f3c87d539e1fe7af38e7580a0409 (patch) | |
tree | 349c425a87ddb3aaa1d7832d5a8e68252fc73ddb /xorg-server/hw/xfree86/common/xf86Configure.c | |
parent | a8a12d4c8be177f63cae7dc96c2b52f09e228a76 (diff) | |
parent | a0b4a1330be6a36ad095222d2ea83927cd33514d (diff) | |
download | vcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.tar.gz vcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.tar.bz2 vcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/glx/glxdriswrast.c
xorg-server/glx/single2.c
xorg-server/hw/xwin/winconfig.c
xorg-server/os/osinit.c
xorg-server/os/xdmcp.c
xorg-server/xkb/xkbInit.c
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Configure.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Configure.c | 71 |
1 files changed, 61 insertions, 10 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Configure.c b/xorg-server/hw/xfree86/common/xf86Configure.c index 99b8b48d7..24f367ec0 100644 --- a/xorg-server/hw/xfree86/common/xf86Configure.c +++ b/xorg-server/hw/xfree86/common/xf86Configure.c @@ -58,17 +58,17 @@ Bool xf86DoConfigurePass1 = TRUE; static Bool foundMouse = FALSE; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -static char *DFLT_MOUSE_DEV = "/dev/sysmouse"; -static char *DFLT_MOUSE_PROTO = "auto"; +static const char *DFLT_MOUSE_DEV = "/dev/sysmouse"; +static const char *DFLT_MOUSE_PROTO = "auto"; #elif defined(linux) -static char DFLT_MOUSE_DEV[] = "/dev/input/mice"; -static char DFLT_MOUSE_PROTO[] = "auto"; +static const char *DFLT_MOUSE_DEV = "/dev/input/mice"; +static const char *DFLT_MOUSE_PROTO = "auto"; #elif defined(WSCONS_SUPPORT) -static char *DFLT_MOUSE_DEV = "/dev/wsmouse"; -static char *DFLT_MOUSE_PROTO = "wsmouse"; +static const char *DFLT_MOUSE_DEV = "/dev/wsmouse"; +static const char *DFLT_MOUSE_PROTO = "wsmouse"; #else -static char *DFLT_MOUSE_DEV = "/dev/mouse"; -static char *DFLT_MOUSE_PROTO = "auto"; +static const char *DFLT_MOUSE_DEV = "/dev/mouse"; +static const char *DFLT_MOUSE_PROTO = "auto"; #endif /* @@ -516,9 +516,9 @@ void DoConfigure(void) { int i,j, screennum = -1; - char *home = NULL; + const char *home = NULL; char filename[PATH_MAX]; - char *addslash = ""; + const char *addslash = ""; XF86ConfigPtr xf86config = NULL; char **vlist, **vl; int *dev2screen; @@ -757,3 +757,54 @@ bail: fflush(stderr); exit(0); } + +/* Xorg -showopts: + * For each driver module installed, print out the list + * of options and their argument types, then exit + * + * Author: Marcus Schaefer, ms@suse.de + */ + +void DoShowOptions (void) { + int i = 0; + char **vlist = 0; + char *pSymbol = 0; + XF86ModuleData *initData = 0; + if (! (vlist = xf86DriverlistFromCompile())) { + ErrorF("Missing output drivers\n"); + goto bail; + } + xf86LoadModules (vlist,0); + free(vlist); + for (i = 0; i < xf86NumDrivers; i++) { + if (xf86DriverList[i]->AvailableOptions) { + OptionInfoPtr pOption = (OptionInfoPtr)(*xf86DriverList[i]->AvailableOptions)(0,0); + if (! pOption) { + ErrorF ("(EE) Couldn't read option table for %s driver\n", + xf86DriverList[i]->driverName + ); + continue; + } + XNFasprintf(&pSymbol, "%sModuleData", + xf86DriverList[i]->driverName); + initData = LoaderSymbol (pSymbol); + if (initData) { + XF86ModuleVersionInfo *vers = initData->vers; + OptionInfoPtr p; + ErrorF ("Driver[%d]:%s[%s] {\n", + i,xf86DriverList[i]->driverName,vers->vendor + ); + for (p = pOption; p->name != NULL; p++) { + ErrorF ("\t%s:%s\n", p->name, + optionTypeToString(p->type)); + } + ErrorF ("}\n"); + } + } + } + bail: + OsCleanup (TRUE); + AbortDDX (EXIT_ERR_DRIVERS); + fflush (stderr); + exit (0); +} |