standalone uda bug +FIX

Steven M. Schultz sms at wlv.imsd.contel.com
Sat Sep 30 04:59:03 AEST 1989


Subject: standalone uda bug +FIX
Index:	sys/pdpstand/ra.c 2.10BSD

Description:
  Some small errors in the stand alone RA driver for 2.10.1.  Mostly
checking for the result of a call to racmd < 0 which isn't going to work
since it returns a pointer type result and a missing argument in one call.

  Thanks for spotting this one Casey.

Repeat-By:
	Examination of the source.
Fix:

*** ra.c.old	Fri Aug 19 01:29:42 1988
--- ra.c	Fri Sep 29 14:41:58 1989
***************
*** 78,84 ****
  		rd.ra_ca.ca_cmdl = (short)&rd.ra_cmd.m_cmdref;
  		rd.ra_ca.ca_cmdh = (short)(segflag & 3);
  		rd.ra_cmd.m_cntflgs = 0;
! 		if (racmd(M_O_STCON) < 0) {
  			printf("RD: controller init error, STCON\n");
  			return(-1);
  		}
--- 78,84 ----
  		rd.ra_ca.ca_cmdl = (short)&rd.ra_cmd.m_cmdref;
  		rd.ra_ca.ca_cmdh = (short)(segflag & 3);
  		rd.ra_cmd.m_cntflgs = 0;
! 		if ((int)racmd(M_O_STCON, 0) < 0) {
  			printf("RD: controller init error, STCON\n");
  			return(-1);
  		}
***************
*** 111,117 ****
  ramount(io)
  	register struct iob *io;
  {
! 	if (racmd(M_O_ONLIN, io->i_unit) < 0) {
  		printf("RD: bring online error, unit=%d\n", io->i_unit & 7);
  		return(-1);
  	}
--- 111,117 ----
  ramount(io)
  	register struct iob *io;
  {
! 	if ((int)racmd(M_O_ONLIN, io->i_unit) < 0) {
  		printf("RD: bring online error, unit=%d\n", io->i_unit & 7);
  		return(-1);
  	}
***************
*** 165,171 ****
  	mp->m_bytecnt = io->i_cc;
  	mp->m_buf_l = (ushort)io->i_ma;
  	mp->m_buf_h = segflag & 3;
! 	if (racmd(func == READ ? M_O_READ : M_O_WRITE, io->i_unit) < 0)
  		return(-1);
  
  	return(io->i_cc);
--- 165,171 ----
  	mp->m_bytecnt = io->i_cc;
  	mp->m_buf_l = (ushort)io->i_ma;
  	mp->m_buf_h = segflag & 3;
! 	if ((int)racmd(func == READ ? M_O_READ : M_O_WRITE, io->i_unit) < 0)
  		return(-1);
  
  	return(io->i_cc);



More information about the Comp.bugs.2bsd mailing list