On 05/06/2013 08:45 AM, Osier Yang wrote: > Which refactored the old code, and introduced new helper > virIsCapableVport, but the path for checking with access() is not > correctly constructed. I'd like to make a couple of suggestions... This issue is/was because "LINUX_SYSFS_VPORT_CREATE_POSTFIX" didn't get refactored into the new code (e.g. "/vport_create") So why not create a "SYSFS_VPORT_CREATE_POSTFIX" symbol in virutil.c like there is a refactored "SYSFS_FC_HOST_PATH" symbol... Then since the "LINUX_" versions of those symbols in src/node_device/node_device_driver.h are no longer used, they could be removed from there as well. There's also the "vport_delete" symbol that could get the same treatment. John > --- > src/util/virutil.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/util/virutil.c b/src/util/virutil.c > index 7773d5c..ebf902d 100644 > --- a/src/util/virutil.c > +++ b/src/util/virutil.c > @@ -3163,7 +3163,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) { > @@ -3172,7 +3172,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) { > -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list