scsi: Fix construction of sysfs device path

The device bus value was used instead of the device target when
building the sysfs device path. Trivial.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
This commit is contained in:
Viktor Mihajlovski 2013-07-08 18:57:58 +02:00 committed by Daniel Veillard
parent 2ce63c1611
commit 2c94e00c60

View File

@ -218,7 +218,7 @@ virSCSIDeviceNew(const char *adapter,
goto cleanup;
if (virAsprintf(&dev->name, "%d:%d:%d:%d", dev->adapter,
dev->bus, dev->bus, dev->unit) < 0 ||
dev->bus, dev->target, dev->unit) < 0 ||
virAsprintf(&dev->sg_path, "/dev/%s", sg) < 0) {
virReportOOMError();
goto cleanup;