From owner-freebsd-scsi Thu Aug 10 18:59:18 2000 Delivered-To: freebsd-scsi@freebsd.org Received: from boromir.vpop.net (dns1.vpop.net [206.117.147.2]) by hub.freebsd.org (Postfix) with ESMTP id 5A72837BB68 for ; Thu, 10 Aug 2000 18:59:16 -0700 (PDT) (envelope-from mreimer@vpop.net) Received: from vpop.net ([209.102.16.48]) by boromir.vpop.net (8.9.3/8.9.3) with ESMTP id SAA91916 for ; Thu, 10 Aug 2000 18:59:11 -0700 (PDT) (envelope-from mreimer@vpop.net) Message-ID: <39935DF5.9FBDB44F@vpop.net> Date: Thu, 10 Aug 2000 18:59:17 -0700 From: Matthew Reimer Organization: VPOP Technologies, Inc. X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-scsi@freebsd.org Subject: Porting an app from old SCSI system to CAM Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I'm trying to get DATlib (ftp://ftp.informatik.uni-erlangen.de/pub/DATlib/) running on FreeBSD 4.1-STABLE. From what I can tell, all I need to do is to reimplement one subroutine (see below). How do I do this? Matt #ifdef __FreeBSD__ /* doesn't look like generic BSD */ #include int send_scsi_command( int scsifd, unsigned char *cmd,int cmdlen, unsigned char *inbuf,int inbuflen, unsigned char *outbuf,int outbuflen, unsigned char *rqbuf,int rqbuflen ) { scsireq_t ucmd; int r; memset (&ucmd, '\0', sizeof (ucmd)); ucmd.flags = 0; ucmd.timeout = 1000; memcpy (ucmd.cmd, (caddr_t)cmd, cmdlen); ucmd.cmdlen = cmdlen; if (inbuf) { ucmd.flags |= SCCMD_READ; ucmd.databuf =(caddr_t)inbuf; ucmd.datalen = inbuflen; } else { ucmd.flags |= SCCMD_WRITE; ucmd.databuf = (caddr_t)outbuf; ucmd.datalen = outbuflen; } if (rqbuf) ucmd.flags|=0; /* FIXME: Huh? Arne? */ r = ioctl(scsifd,SCIOCCOMMAND,&ucmd); if (rqbuf) memcpy (rqbuf, ucmd.sense, rqbuflen); return r; } /* send_scsi_command */ #endif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message