[libvirt] [PATCH] qemuProcessBuildDestroyMemoryPathsImpl: Don't overwrite error

The qemuSecurityDomainSetPathLabel() function reports perfect error itself. Do not overwrite it to something less meaningful. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_process.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 960c3ed011..eb9904b7ba 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3669,11 +3669,8 @@ qemuProcessBuildDestroyMemoryPathsImpl(virQEMUDriverPtr driver, } if (qemuSecurityDomainSetPathLabel(driver->securityManager, - def, path, true) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unable to label %s"), path); + def, path, true) < 0) return -1; - } } else { if (virFileDeleteTree(path) < 0) return -1; -- 2.16.4

On Fri, Sep 07, 2018 at 02:09:14PM +0200, Michal Privoznik wrote:
The qemuSecurityDomainSetPathLabel() function reports perfect error itself. Do not overwrite it to something less meaningful.
On first glance, I thought AppArmorSetPathLabel does not set a libvirt error, but it turns out that 'reload_profile' actually is a libvirt function, despite not following the naming conventions.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_process.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
participants (2)
-
Ján Tomko
-
Michal Privoznik