*len = sense_data_build(data, 0xf0, ILLEGAL_REQUEST,
*len = sense_data_build(data, 0x70, ILLEGAL_REQUEST,
static int mode_sense(int tid, uint32_t lun, uint8_t *scb, uint8_t *data, int *len){	int result = SAM_STAT_GOOD;	uint8_t pcode = scb[2] & 0x3f;	uint64_t size;	if (device_info(tid, lun, &size) < 0) {		*len = sense_data_build(data, 0xf0, ILLEGAL_REQUEST,					0x25, 0);		return SAM_STAT_CHECK_CONDITION;	}	*len = 4;	size >>= blk_shift;	if ((scb[1] & 0x8))		data[3] = 0;	else {		data[3] = 8;		*len += 8;		*(uint32_t *)(data + 4) = (size >> 32) ?			cpu_to_be32(0xffffffff) : cpu_to_be32(size);		*(uint32_t *)(data + 8) = cpu_to_be32(1 << blk_shift);	}	switch (pcode) {	case 0x0:		break;	case 0x2:		*len += insert_disconnect_pg(data + *len);		break;	case 0x3:		*len += insert_format_m_pg(data + *len);		break;	case 0x4:		*len += insert_geo_m_pg(data + *len, size);		break;	case 0x8:		*len += insert_caching_pg(data + *len);		break;	case 0xa:		*len += insert_ctrl_m_pg(data + *len);		break;	case 0x1c:		*len += insert_iec_m_pg(data + *len);		break;	case 0x3f:		*len += insert_disconnect_pg(data + *len);		*len += insert_format_m_pg(data + *len);		*len += insert_geo_m_pg(data + *len, size);		*len += insert_caching_pg(data + *len);		*len += insert_ctrl_m_pg(data + *len);		*len += insert_iec_m_pg(data + *len);		break;	default:		result = SAM_STAT_CHECK_CONDITION;		*len = sense_data_build(data, 0xf0, ILLEGAL_REQUEST,					0x24, 0);	}	data[0] = *len - 1;	return result;}