kernels/linux-2.4.0/drivers/scsi/ips.c
/****************************************************************************/
/*                                                                          */
/* Routine Name: ips_is_passthru                                            */
/*                                                                          */
/* Routine Description:                                                     */
/*                                                                          */
/*   Determine if the specified SCSI command is really a passthru command   */
/*                                                                          */
/****************************************************************************/


Routine Description.

Determine if the specified SCSI command is really a passthru command
Routine Description . Determine if the specified SCSI command is really a passthru command
static int
ips_is_passthru(Scsi_Cmnd *SC) {
   METHOD_TRACE("ips_is_passthru", 1);
   if (!SC)
      return (0);
   if (((SC->cmnd[0] == IPS_IOCTL_COMMAND) || (SC->cmnd[0] == IPS_IOCTL_NEW_COMMAND)) &&
       (SC->channel == 0) &&
       (SC->target == IPS_ADAPTER_ID) &&
       (SC->lun == 0) &&
       (SC->request_bufflen) &&
       (!SC->use_sg) &&
       (((char *) SC->request_buffer)[0] == 'C') &&
       (((char *) SC->request_buffer)[1] == 'O') &&
       (((char *) SC->request_buffer)[2] == 'P') &&
       (((char *) SC->request_buffer)[3] == 'P')) {
      return (1);
   } else {
      return (0);
   }
}
static int ips_is_passthru ( Scsi_Cmnd * SC ) { METHOD_TRACE ( " " , 1 ) ; if ( ! SC ) return ( 0 ) ; if ( ( ( SC -> cmnd [ 0 ] == IPS_IOCTL_COMMAND ) || ( SC -> cmnd [ 0 ] == IPS_IOCTL_NEW_COMMAND ) ) && ( SC -> channel == 0 ) && ( SC -> target == IPS_ADAPTER_ID ) && ( SC -> lun == 0 ) && ( SC -> request_bufflen ) && ( ! SC -> use_sg ) && ( ( ( char * ) SC -> request_buffer ) [ 0 ] == ' ' ) && ( ( ( char * ) SC -> request_buffer ) [ 1 ] == ' ' ) && ( ( ( char * ) SC -> request_buffer ) [ 2 ] == ' ' ) && ( ( ( char * ) SC -> request_buffer ) [ 3 ] == ' ' ) ) { return ( 1 ) ; } else { return ( 0 ) ; } }
Routine Name: ips_is_passthru
Routine Name : ips_is_passthru