diff options
Diffstat (limited to 'examples/vhost_scsi/scsi.c')
-rw-r--r-- | examples/vhost_scsi/scsi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c index 54d3104e..fd430ec2 100644 --- a/examples/vhost_scsi/scsi.c +++ b/examples/vhost_scsi/scsi.c @@ -307,7 +307,9 @@ vhost_bdev_scsi_inquiry_command(struct vhost_block_dev *bdev, strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8); /* PRODUCT IDENTIFICATION */ - strncpy((char *)inqdata->product_id, bdev->product_name, 16); + snprintf((char *)inqdata->product_id, + RTE_DIM(inqdata->product_id), "%s", + bdev->product_name); /* PRODUCT REVISION LEVEL */ strncpy((char *)inqdata->product_rev, "0001", 4); |