Subject: Problem with sys/dev/ccd.c vs. COMPAT_NOLABEL
To: port-hp300 <port-hp300@sun-lamp.cs.berkeley.edu>
From: Scott Reynolds <scottr@Plexus.COM>
List: port-hp300
Date: 08/13/1994 11:33:51
I puzzled over this one for a couple minutes on Thursday, but due to some 
brain damage it wasn't clear to me why it was broken.  As it turns out, it 
appears that a global search and replace went a bit too far. :-)

Here's the patch to get ccd to compile when COMPAT_NOLABEL is defined.

--scott

*** ccd.c.dist	Sat Jul  2 05:54:07 1994
--- ccd.c	Sat Aug 13 11:21:36 1994
***************
*** 216,226 ****
  			int i, flag;
  
  			for (i = 0; i < nchrdev; i++)
! 				if (ccdevsw[i].d_open == bsw->d_open)
  					break;
! 			if (i != nchrdev && ccdevsw[i].d_ioctl) {
  				flag = 1;
! 				(void)(*ccdevsw[i].d_ioctl)(dev, DIOCWLABEL,
  					(caddr_t)&flag, FWRITE, p);
  			}
  		}
--- 216,226 ----
  			int i, flag;
  
  			for (i = 0; i < nchrdev; i++)
! 				if (cdevsw[i].d_open == bsw->d_open)
  					break;
! 			if (i != nchrdev && cdevsw[i].d_ioctl) {
  				flag = 1;
! 				(void)(*cdevsw[i].d_ioctl)(dev, DIOCWLABEL,
  					(caddr_t)&flag, FWRITE, p);
  			}
  		}



------------------------------------------------------------------------------