sprintf(data + 8, "deadbeaf%d:%llu", tid, lun);
sprintf(data + 8, "deadbeaf%d:%" PRIu64, tid, lun);
static int inquiry(int tid, uint64_t lun, uint8_t *scb, uint8_t *data, int *len){	int result = SAM_STAT_CHECK_CONDITION;	if (((scb[1] & 0x3) == 0x3) || (!(scb[1] & 0x3) && scb[2]))		goto err;	if (!(scb[1] & 0x3)) {		data[2] = 4;		data[3] = 0x42;		data[4] = 59;		data[7] = 0x02;		memset(data + 8, 0x20, 28);		memcpy(data + 8,		       VENDOR_ID, min_t(size_t, strlen(VENDOR_ID), 8));		memcpy(data + 16,		       PRODUCT_ID, min_t(size_t, strlen(PRODUCT_ID), 16));		memcpy(data + 32,		       PRODUCT_REV, min_t(size_t, strlen(PRODUCT_REV), 4));		data[58] = 0x03;		data[59] = 0x20;		data[60] = 0x09;		data[61] = 0x60;		data[62] = 0x03;		data[63] = 0x00;		*len = 64;		result = SAM_STAT_GOOD;	} else if (scb[1] & 0x2) {		/* CmdDt bit is set */		/* We do not support it now. */		data[1] = 0x1;		data[5] = 0;		*len = 6;		result = SAM_STAT_GOOD;	} else if (scb[1] & 0x1) {		/* EVPD bit set */		if (scb[2] == 0x0) {			data[1] = 0x0;			data[3] = 3;			data[4] = 0x0;			data[5] = 0x80;			data[6] = 0x83;			*len = 7;			result = SAM_STAT_GOOD;		} else if (scb[2] == 0x80) {			data[1] = 0x80;			data[3] = 4;			memset(data + 4, 0x20, 4);			*len = 8;			result = SAM_STAT_GOOD;		} else if (scb[2] == 0x83) {#define SCSI_ID_LEN	24			uint32_t tmp = SCSI_ID_LEN * sizeof(uint8_t);			data[1] = 0x83;			data[3] = tmp + 4;			data[4] = 0x1;			data[5] = 0x1;			data[7] = tmp;			if (lun != ~0ULL)				sprintf(data + 8, "deadbeaf%d:%llu", tid, lun);			*len = tmp + 8;			result = SAM_STAT_GOOD;		}	}	if (result != SAM_STAT_GOOD)		goto err;	*len = min_t(int, *len, scb[4]);	if (lun == ~0ULL)		data[0] = TYPE_NO_LUN;	return SAM_STAT_GOOD;err:	*len = sense_data_build(data, 0x70, ILLEGAL_REQUEST,				0x24, 0);	return SAM_STAT_CHECK_CONDITION;}