func: static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf) SCSITargetReq * r = DO_UPCAST ( SCSITargetReq , req , req ) ; switch ( buf [ 0 ] )  r -> len = scsi_device_get_sense ( r -> req . dev , r -> buf , MIN ( req -> cmd . xfer , r -> buf_len ) , ( req -> cmd . buf [ 1 ] & 1 ) == 0 ); int scsi_device_get_sense(SCSIDevice *dev, uint8_t *buf, int len, bool fixed) return scsi_build_sense ( dev -> sense , dev -> sense_len , buf , len , fixed ) ; int scsi_build_sense(uint8_t *in_buf, int uint8_t *buf, int len, bool fixed) bool fixed_in ; if ( ! fixed && len < 8 )  if ( in_len == 0 )  fixed_in = ( in_buf [ 0 ] & 2 ) == 0; if ( fixed == fixed_in )  memcpy ( buf , in_buf , MIN ( len , in_len ) ); 