]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Fix regression introduced by commit 4360a098441
authorOsier Yang <jyang@redhat.com>
Mon, 6 May 2013 12:45:12 +0000 (20:45 +0800)
committerOsier Yang <jyang@redhat.com>
Mon, 13 May 2013 09:12:55 +0000 (17:12 +0800)
Which refactored the old code, and introduced new helper
virIsCapableVport, but the path for checking with access() is not
correctly constructed.

src/util/virutil.c

index 39eeefb99ef65dba59276bd892ef2c1913653188..5412eb5ebbece5239bc9280d112ae69f44e284a5 100644 (file)
@@ -1734,7 +1734,7 @@ virIsCapableVport(const char *sysfs_prefix,
     int ret = -1;
 
     if (virAsprintf(&fc_host_path,
-                    "%shost%d%s",
+                    "%shost%d/%s",
                     sysfs_prefix ? sysfs_prefix : SYSFS_FC_HOST_PATH,
                     host,
                     "vport_create") < 0) {
@@ -1743,7 +1743,7 @@ virIsCapableVport(const char *sysfs_prefix,
     }
 
     if (virAsprintf(&scsi_host_path,
-                    "%shost%d%s",
+                    "%shost%d/%s",
                     sysfs_prefix ? sysfs_prefix : SYSFS_SCSI_HOST_PATH,
                     host,
                     "vport_create") < 0) {