* file named AUTHORS, in the root directory of this distribution.
*/
/*
- * $Id: scsi-cam.c,v 1.10.4.1.2.3.2.1 2004/04/29 20:47:21 martinea Exp $
+ * $Id: scsi-cam.c,v 1.14 2005/10/15 13:20:47 martinea Exp $
*
* Interface to execute SCSI commands on an system with cam support
* Current support is for FreeBSD 4.x
void SCSI_OS_Version()
{
#ifndef lint
- static char rcsid[] = "$Id: scsi-cam.c,v 1.10.4.1.2.3.2.1 2004/04/29 20:47:21 martinea Exp $";
+ static char rcsid[] = "$Id: scsi-cam.c,v 1.14 2005/10/15 13:20:47 martinea Exp $";
DebugPrint(DEBUG_INFO, SECTION_INFO, "scsi-os-layer: %s\n",rcsid);
#endif
}
if (pDev[DeviceFD].devopen == 0)
{
- SCSI_OpenDevice(DeviceFD);
+ if (SCSI_OpenDevice(DeviceFD) == 0)
+ {
+ cam_freeccb(ccb);
+ return(SCSI_ERROR);
+ }
}
ret = cam_send_ccb(pDev[DeviceFD].curdev, ccb);
int ret = 0;
if (pDev[DeviceFD].devopen == 0)
- {
- SCSI_OpenDevice(DeviceFD);
- }
+ if (SCSI_OpenDevice(DeviceFD) == 0)
+ return(-1);
switch (command)
{
int ret = 0;
if (pDev[DeviceFD].devopen == 0)
- {
- SCSI_OpenDevice(DeviceFD);
- }
+ if (SCSI_OpenDevice(DeviceFD) == 0)
+ return(-1);
if (ioctl(pDev[DeviceFD].fd , MTIOCGET, &mtget) != 0)
{