From a0b4a1330be6a36ad095222d2ea83927cd33514d Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 25 Nov 2011 08:22:48 +0100 Subject: mesa xserver pixman git update 25 nov 2011 --- xorg-server/hw/xfree86/common/xf86Configure.c | 71 +++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 10 deletions(-) (limited to 'xorg-server/hw/xfree86/common/xf86Configure.c') 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); +} -- cgit v1.2.3