[libvirt] [PATCH 0/3] Couple of small fixes and improvements

Fixed trailing '/' for path, removed an obsolete comment, and removed a useless warning. Bjoern Walk (1): virutil: fix trailing '/' for path prefixes Marc Hartmayer (2): virfile: Only generate a warning if there is something to report qemu: Removed an outdated comment in qemuDomainSaveImageStartVM() src/qemu/qemu_driver.c | 1 - src/util/virfile.c | 2 +- src/util/virutil.c | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) -- 2.5.5

Only generate a warning if there is something to report. Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com> --- src/util/virfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index a45279a..f006abf 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -325,7 +325,7 @@ virFileWrapperFdClose(virFileWrapperFdPtr wfd) return 0; ret = virCommandWait(wfd->cmd, NULL); - if (wfd->err_msg) + if (wfd->err_msg && *wfd->err_msg) VIR_WARN("iohelper reports: %s", wfd->err_msg); return ret; -- 2.5.5

From: Bjoern Walk <bwalk@linux.vnet.ibm.com> The path prefixes for sysfs trees are always prepended by paths beginning with a slash, making the trailing slash in the prefix redundant. Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com> Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com> --- 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 844c947..0291378 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -1777,8 +1777,8 @@ virGetDeviceUnprivSGIO(const char *path, } #ifdef __linux__ -# define SYSFS_FC_HOST_PATH "/sys/class/fc_host/" -# define SYSFS_SCSI_HOST_PATH "/sys/class/scsi_host/" +# define SYSFS_FC_HOST_PATH "/sys/class/fc_host" +# define SYSFS_SCSI_HOST_PATH "/sys/class/scsi_host" /* virReadSCSIUniqueId: * @sysfs_prefix: "scsi_host" sysfs path, defaults to SYSFS_SCSI_HOST_PATH -- 2.5.5

Removed the comment 'Set the migration source' as it isn't valid anymore and 'start it up' isn't useful as qemuProcessStart() is already a speaking name. Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> --- src/qemu/qemu_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d039255..49c7303 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6609,7 +6609,6 @@ qemuDomainSaveImageStartVM(virConnectPtr conn, } } - /* Set the migration source and start it up. */ if (qemuProcessStart(conn, driver, vm, asyncJob, "stdio", *fd, path, NULL, VIR_NETDEV_VPORT_PROFILE_OP_RESTORE, -- 2.5.5

On 11/18/2016 08:18 AM, Marc Hartmayer wrote:
Fixed trailing '/' for path, removed an obsolete comment, and removed a useless warning.
Bjoern Walk (1): virutil: fix trailing '/' for path prefixes
Marc Hartmayer (2): virfile: Only generate a warning if there is something to report qemu: Removed an outdated comment in qemuDomainSaveImageStartVM()
src/qemu/qemu_driver.c | 1 - src/util/virfile.c | 2 +- src/util/virutil.c | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-)
ACK series (and pushed), John
participants (2)
-
John Ferlan
-
Marc Hartmayer