util: Fix regression introduced by commit 4360a09844

Which refactored the old code, and introduced new helper
virIsCapableVport, but the path for checking with access() is not
correctly constructed.
This commit is contained in:
Osier Yang 2013-05-06 20:45:12 +08:00
parent b76284afb1
commit e106c0112a

View 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) {