[comp.windows.x] Small bug in Xsun server

cszj@vax5.CIT.CORNELL.EDU (05/19/89)

Hi,

I don't know if this was posted before, but I found a small bug in the
Xsun server. The manual page says that the server "-dev" option accepts
a list of devices separated by colons to open, but it really ignores all
but the first due to that bug. 

In our department we have two kinds of color sun 3/60's ones that have
/dev/bwtwo0, /dev/bwtwo1 and /dev/cgfour0
and ones that have
/dev/bwtwo1 and /dev/cgfour0.

If you have a cg4, try making 
/dev/cgfour0 and /dev/bwtwo1 and then tell it to open both... 

This will fail because the server does not know about bwtwo1's and
because of the above bug...

These are the context diffs, that fix both problems: 


*** WARNING: THESE ARE NOT OFFICIAL PATCHES, SO REMEMBER TO KEEP A
***          COPY OF THE ORIGINAL FILE.


*** server/ddx/sun/sunInit.c.orig	Sun Aug 14 09:40:35 1988
--- server/ddx/sun/sunInit.c	Mon May 15 16:39:16 1989
***************
*** 104,109 ****
--- 104,110 ----
  #ifdef ZOIDS
  sunFbDataRec sunFbData[] = {
      sunBW2Probe,  	"/dev/bwtwo0",	    neverProbed,	0, 0,
+     sunBW2Probe,  	"/dev/bwtwo1",	    neverProbed,	0, 0,
      sunCG2CProbe,  	"/dev/cgtwo0",	    neverProbed,	0, 0,
      sunCG3CProbe,  	"/dev/cgthree0",    neverProbed,	0, 0,
      sunCG4CProbe,  	"/dev/cgfour0",	    neverProbed,	0, 0,
***************
*** 111,116 ****
--- 112,118 ----
  #else  ZOIDS
  sunFbDataRec sunFbData[] = {
      sunBW2Probe,  	"/dev/bwtwo0",	    neverProbed,
+     sunBW2Probe,  	"/dev/bwtwo1",	    neverProbed,
      sunCG2CProbe,  	"/dev/cgtwo0",	    neverProbed,
      sunCG3CProbe,  	"/dev/cgthree0",    neverProbed,
      sunCG4CProbe,  	"/dev/cgfour0",	    neverProbed,
***************
*** 440,445 ****
--- 442,449 ----
  	while (*dList && *dList != ':') {
  	    dList++;
  	}
+ 	if (*dList == ':')
+ 	    dList++;
      }
      if (*dList) {
  	register char *cp = dList;

Please send replies, flames or anything else to:
  _________________________________________________________________
 | ARPA: christos@ee.cornell.edu  BITNET: christos@crnlee.bitnet   |
 | UUCP: {cmc12,shasta,uw-beaver,rochester}!cornell!tesla!christos |
  -----------------------------------------------------------------