From e106c0112a3a5d06fcea74b0d1d130c720c1c829 Mon Sep 17 00:00:00 2001 From: Osier Yang Date: Mon, 6 May 2013 20:45:12 +0800 Subject: [PATCH] util: Fix regression introduced by commit 4360a098441 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 39eeefb99e..5412eb5ebb 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -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) { -- 2.39.5