xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Tue Aug 19 12:11:40 PDT 2008


 hw/xfree86/common/xf86Init.c |   27 ++-------------------------
 1 file changed, 2 insertions(+), 25 deletions(-)

New commits:
commit 47b31233c26f710be70ffcca17e5402d03d5733f
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 19 15:10:12 2008 -0400

    Simplify driver setup.
    
    No point warning about missing driver hooks, that just means the person
    who gave you the driver is inept.  Might as well just crash.  Also,
    just name anonymous screens as screen%d instead of failing after the 36th
    screen.  Bonus points if you can figure out what the failure mode would
    be on the 36th screen, and what the effective screen limit was.

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index cb7b898..88c5a87 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -868,37 +868,14 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
       return;
     }
 
-    /* This could be moved into a separate function */
-
-    /*
-     * Check that all screens have initialised the mandatory function
-     * entry points.  Delete those which have not.
-     */
-
-#define WARN_SCREEN(func) \
-    xf86Msg(X_ERROR, "Driver `%s' has no %s function, deleting.\n", \
-	   xf86Screens[i]->name, (warned++, func))
-
     for (i = 0; i < xf86NumScreens; i++) {
-      int warned = 0;
       if (xf86Screens[i]->name == NULL) {
-	xf86Screens[i]->name = xnfalloc(strlen("screen") + 1 + 1);
-	if (i < 10)
-	  sprintf(xf86Screens[i]->name, "screen%c", i + '0');
-	else
-	  sprintf(xf86Screens[i]->name, "screen%c", i - 10 + 'A');
+	xf86Screens[i]->name = xnfalloc(strlen("screen") + 10 + 1);
+	sprintf(xf86Screens[i]->name, "screen%d", i);
 	xf86MsgVerb(X_WARNING, 0,
 		    "Screen driver %d has no name set, using `%s'.\n",
 		    i, xf86Screens[i]->name);
       }
-      if (xf86Screens[i]->ScreenInit == NULL)
-	WARN_SCREEN("ScreenInit");
-      if (xf86Screens[i]->EnterVT == NULL)
-	WARN_SCREEN("EnterVT");
-      if (xf86Screens[i]->LeaveVT == NULL)
-	WARN_SCREEN("LeaveVT");
-      if (warned)
-	xf86DeleteScreen(i--, 0);
     }
 
     /*


More information about the xorg-commit mailing list