aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86Configure.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
committermarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
commita0b4a1330be6a36ad095222d2ea83927cd33514d (patch)
tree616920ca608751e843c92c9815069f43789e3097 /xorg-server/hw/xfree86/common/xf86Configure.c
parent45710577f374972946a8eb37833a9c94e5a299bf (diff)
downloadvcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.gz
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.bz2
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.zip
mesa xserver pixman git update 25 nov 2011
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Configure.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Configure.c71
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);
+}