The device bus value was used instead of the device target when
building the sysfs device path. Trivial.
Signed-off-by: Viktor Mihajlovski <mihajlov(a)linux.vnet.ibm.com>
---
Should probably go into the 1.0.6 maintenance branch as well.
src/util/virscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virscsi.c b/src/util/virscsi.c
index 4870307..726121b 100644
--- a/src/util/virscsi.c
+++ b/src/util/virscsi.c
@@ -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;
--
1.7.9.5