FreeBSD/sys/dev/isci/scil/sati_util.c
/**
 * @brief This method checks to make sure that the translation isn't
 *        exceeding the allocation length specified in the CDB prior
 *        to retrieving the payload data byte from the user's buffer.
 *
 * @param[in,out] scsi_io This parameter specifies the user's IO request
 *                for which to set the user payload data byte.
 * @param[in]     byte_offset This parameter specifies the offset into
 *                the user's payload buffer at which to write the supplied
 *                value.
 * @param[in]     value This parameter specifies the memory location into
 *                which to read the value from the user's payload buffer.
 *
 * @return none
 */
@brief This method checks to make sure that the translation isn't
exceeding the allocation length specified in the CDB prior
to retrieving the payload data byte from the user's buffer.

@param[in,out] scsi_io This parameter specifies the user's IO request
for which to set the user payload data byte.
@param[in]     byte_offset This parameter specifies the offset into
the user's payload buffer at which to write the supplied
value.
@param[in]     value This parameter specifies the memory location into
which to read the value from the user's payload buffer.

@return none
@brief This method checks to make sure that the translation isn ' t exceeding the allocation length specified in the CDB prior to retrieving the payload data byte from the user ' s buffer . @param [ in out ] scsi_io This parameter specifies the user ' s IO request for which to set the user payload data byte . @param [ in ] byte_offset This parameter specifies the offset into the user ' s payload buffer at which to write the supplied value . @param [ in ] value This parameter specifies the memory location into which to read the value from the user ' s payload buffer . @return none
void sati_get_data_byte(
   SATI_TRANSLATOR_SEQUENCE_T * sequence,
   void                       * scsi_io,
   U32                          byte_offset,
   U8                         * value
)
{
   if (byte_offset < sequence->allocation_length)
      sati_cb_get_data_byte(scsi_io, byte_offset, value);
}
void sati_get_data_byte ( SATI_TRANSLATOR_SEQUENCE_T * sequence , void * scsi_io , U32 byte_offset , U8 * value ) { if ( byte_offset < sequence -> allocation_length ) sati_cb_get_data_byte ( scsi_io , byte_offset , value ) ; }
@brief This method checks to make sure that the translation isn't
        exceeding the allocation length specified in the CDB prior
        to retrieving the payload data byte from the user's buffer.
@brief This method checks to make sure that the translation isn ' t exceeding the allocation length specified in the CDB prior to retrieving the payload data byte from the user ' s buffer .