[libvirt] [PATCH] scsi: Fix construction of sysfs device path

Daniel Veillard veillard at redhat.com
Tue Jul 9 03:35:52 UTC 2013


On Mon, Jul 08, 2013 at 06:57:58PM +0200, Viktor Mihajlovski wrote:
> The device bus value was used instead of the device target when
> building the sysfs device path. Trivial.
> 
> Signed-off-by: Viktor Mihajlovski <mihajlov at 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;

  ACk, pushed to master,

Daniel

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard at redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list