FreeBSD/sys/dev/isci/scil/sati_util.c
/**
 * @brief This method is utilized to set a specific byte in the sense
 *        data area.  It will ensure that the supplied byte offset
 *        isn't larger then the length of the requested sense data.
 *
 * @param[in] scsi_io This parameter specifies the user SCSI IO request
 *            for which to set the sense data byte.
 * @param[in] byte_offset This parameter specifies the byte offset into
 *            the sense data buffer where the data should be written.
 * @param[in] value This parameter specifies the 8-bit value to be written
 *            into the sense data area.
 *
 * @return none
 */
@brief This method is utilized to set a specific byte in the sense
data area.  It will ensure that the supplied byte offset
isn't larger then the length of the requested sense data.

@param[in] scsi_io This parameter specifies the user SCSI IO request
for which to set the sense data byte.
@param[in] byte_offset This parameter specifies the byte offset into
the sense data buffer where the data should be written.
@param[in] value This parameter specifies the 8-bit value to be written
into the sense data area.

@return none
@brief This method is utilized to set a specific byte in the sense data area . It will ensure that the supplied byte offset isn ' t larger then the length of the requested sense data . @param [ in ] scsi_io This parameter specifies the user SCSI IO request for which to set the sense data byte . @param [ in ] byte_offset This parameter specifies the byte offset into the sense data buffer where the data should be written . @param [ in ] value This parameter specifies the 8 - bit value to be written into the sense data area . @return none
void sati_set_sense_data_byte(
   U8  * sense_data,
   U32   max_sense_data_len,
   U32   byte_offset,
   U8    value
)
{
   if (byte_offset < max_sense_data_len)
      sense_data[byte_offset] = value;
}
void sati_set_sense_data_byte ( U8 * sense_data , U32 max_sense_data_len , U32 byte_offset , U8 value ) { if ( byte_offset < max_sense_data_len ) sense_data [ byte_offset ] = value ; }
@brief This method is utilized to set a specific byte in the sense
        data area.
@brief This method is utilized to set a specific byte in the sense data area .
// Ensure that we don't attempt to write past the end of the sense // data buffer.