memset(resp, '\0', sizeof(*resp));
resp->data_format = 1;
resp->additional_len = 0x1f;
- strncpy(resp->vendor,
- plat->flash_strings[STRINGID_MANUFACTURER - 1].s,
- sizeof(resp->vendor));
- strncpy(resp->product,
- plat->flash_strings[STRINGID_PRODUCT - 1].s,
- sizeof(resp->product));
+ strncpy(resp->vendor, info->vendor, sizeof(resp->vendor));
+ strncpy(resp->product, info->product, sizeof(resp->product));
strncpy(resp->revision, "1.0", sizeof(resp->revision));
setup_response(priv, resp, sizeof(*resp));
break;
info->buff = malloc(SANDBOX_FLASH_BUF_SIZE);
if (!info->buff)
return log_ret(-ENOMEM);
+ info->vendor = plat->flash_strings[STRINGID_MANUFACTURER - 1].s;
+ info->product = plat->flash_strings[STRINGID_PRODUCT - 1].s;
return 0;
}
/**
* struct scsi_emul_info - information for emulating a SCSI device
*
+ * @vendor: Vendor name
+ * @product: Product name
+ *
* @phase: Current SCSI phase
* @buff_used: Number of bytes ready to transfer back to host
* @read_len: Number of bytes of data left in the current read command
struct scsi_emul_info {
/* provided by the caller: */
void *buff;
+ const char *vendor;
+ const char *product;
/* state maintained by the emulator: */
enum scsi_cmd_phase phase;