]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
scsi: Fix construction of sysfs device path
authorViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Mon, 8 Jul 2013 16:57:58 +0000 (18:57 +0200)
committerDaniel Veillard <veillard@redhat.com>
Tue, 9 Jul 2013 03:23:54 +0000 (11:23 +0800)
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>
src/util/virscsi.c

index 48703071f3026b0fd3e3783e4eced9a73343e2c9..726121b9dd05b0390edde79e18ab5b2bf6b53376 100644 (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;