Subject: Re: SCSI raw commands ...
To: Phil Nelson <phil@cs.wwu.edu>
From: enami tsugutomo <enami@but-b.or.jp>
List: current-users
Date: 09/14/1997 10:12:33
enami tsugutomo <enami@but-b.or.jp> writes:

> This is because new member `type' is added to struct scsi_addr in
> sys/scsiio.h.  So, the binary compatiblity has been lost.

I'll support binary compatibility, but anyway, the source won't
compile anymore with current environment.  To compile it, please apply
the patch apppended below.

enami.
*** scsi-bsd.c	1997/09/14 00:40:17	1.1
--- scsi-bsd.c	1997/09/14 00:42:44
***************
*** 127,139 ****
  		errmsg("Cannot get SCSI addr.\n");
  		return (-1);
  	}
- 	if (debug)
- 		printf("Bus: %d Target: %d Lun: %d\n",
- 			saddr.scbus, saddr.target, saddr.lun);
  
  	Bus	= saddr.scbus;
  	Target	= saddr.target;
  	Lun	= saddr.lun;
  
  	if (Bus >= MAX_SCG || Target >= 8 || Lun >= 8)
  		return (-1);
--- 127,144 ----
  		errmsg("Cannot get SCSI addr.\n");
  		return (-1);
  	}
  
+ #ifdef __NetBSD__
+ 	Bus	= saddr.addr.scsi.scbus;
+ 	Target	= saddr.addr.scsi.target;
+ 	Lun	= saddr.addr.scsi.lun;
+ #else
  	Bus	= saddr.scbus;
  	Target	= saddr.target;
  	Lun	= saddr.lun;
+ #endif
+ 	if (debug)
+ 		printf("Bus: %d Target: %d Lun: %d\n", Bus, Target, Lun);
  
  	if (Bus >= MAX_SCG || Target >= 8 || Lun >= 8)
  		return (-1);