summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2009-11-04 02:36:03 +0100
committerLuc Verhaegen <libv@skynet.be>2009-11-04 02:36:03 +0100
commit70530ab3720f96ed11a5f7e982a202e19c746c54 (patch)
tree6a2d81556226ca50292a28e2d6b224d7939d03f0
parent4ce10d43140cc6ebc497d3bdc39fed9ba9427911 (diff)
Wrapper: fix wrapper under DoConfigure circumstances.
xf86MatchDevice returns one then, but the pointer is still nulled. Accessing the first element of NULL then leads to fun. Also fix up the DoConfigure message of preinit (where we stop PreInit from being abused for monitor configuring).
-rw-r--r--src/via_driver.c6
-rw-r--r--wrapper/wrapper.c12
2 files changed, 16 insertions, 2 deletions
diff --git a/src/via_driver.c b/src/via_driver.c
index 0501b49..8622ddb 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1101,8 +1101,10 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
VIAFUNC(pScrn);
if (flags & PROBE_DETECT) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "libv doesn't believe in "
- "PROBE_DETECT calling PreInit.\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Skipping DDC probing in xserver configure stage.\n"
+ " libv does not believe in preconfigured monitors; "
+ "They should only be used\n as a last resort.\n");
return FALSE;
}
diff --git a/wrapper/wrapper.c b/wrapper/wrapper.c
index 4a2c6b8..a443165 100644
--- a/wrapper/wrapper.c
+++ b/wrapper/wrapper.c
@@ -76,6 +76,18 @@ WRAP_REPLACE(Setup)(
{
static int Initialised = FALSE;
+ if (xf86DoConfigure && xf86DoConfigurePass1) {
+ xf86Msg(X_WARNING, "%s: xserver is configuring, skipping wrapper"
+ " driver.\n", __func__);
+
+ if (errmaj)
+ *errmaj = LDR_NOERROR;
+ if (errmin)
+ *errmin = 0;
+
+ return NULL;
+ }
+
if (Initialised) {
if (errmaj)
*errmaj = LDR_ONCEONLY;