render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
79b470
From 16b2178f23f82688b988c12bf7ee6caa97974669 Mon Sep 17 00:00:00 2001
79b470
Message-Id: <16b2178f23f82688b988c12bf7ee6caa97974669@dist-git>
79b470
From: Michal Privoznik <mprivozn@redhat.com>
79b470
Date: Mon, 27 Jul 2020 12:36:53 +0200
79b470
Subject: [PATCH] virDevMapperGetTargets: Don't ignore EBADF
79b470
MIME-Version: 1.0
79b470
Content-Type: text/plain; charset=UTF-8
79b470
Content-Transfer-Encoding: 8bit
79b470
79b470
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
79b470
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
79b470
(cherry picked from commit e450ebb4c6eab1b7376a5ba873d10936ad563b75)
79b470
79b470
https://bugzilla.redhat.com/show_bug.cgi?id=1860421
79b470
79b470
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
79b470
Message-Id: <6dc32e8797122ad9ecd44a60aaff8e70d060b3b9.1595846084.git.mprivozn@redhat.com>
79b470
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
79b470
---
79b470
 src/qemu/qemu_cgroup.c | 2 +-
79b470
 src/qemu/qemu_domain.c | 4 ++--
79b470
 2 files changed, 3 insertions(+), 3 deletions(-)
79b470
79b470
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
79b470
index 57a1231855..3a62b4ac15 100644
79b470
--- a/src/qemu/qemu_cgroup.c
79b470
+++ b/src/qemu/qemu_cgroup.c
79b470
@@ -89,7 +89,7 @@ qemuSetupImagePathCgroup(virDomainObjPtr vm,
79b470
     }
79b470
 
79b470
     if (virDevMapperGetTargets(path, &targetPaths) < 0 &&
79b470
-        errno != ENOSYS && errno != EBADF) {
79b470
+        errno != ENOSYS) {
79b470
         virReportSystemError(errno,
79b470
                              _("Unable to get devmapper targets for %s"),
79b470
                              path);
79b470
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
79b470
index ffe88ff027..35b536868a 100644
79b470
--- a/src/qemu/qemu_domain.c
79b470
+++ b/src/qemu/qemu_domain.c
79b470
@@ -14924,7 +14924,7 @@ qemuDomainSetupDisk(virQEMUDriverConfigPtr cfg G_GNUC_UNUSED,
79b470
                 goto cleanup;
79b470
 
79b470
             if (virDevMapperGetTargets(next->path, &targetPaths) < 0 &&
79b470
-                errno != ENOSYS && errno != EBADF) {
79b470
+                errno != ENOSYS) {
79b470
                 virReportSystemError(errno,
79b470
                                      _("Unable to get devmapper targets for %s"),
79b470
                                      next->path);
79b470
@@ -15985,7 +15985,7 @@ qemuDomainNamespaceSetupDisk(virDomainObjPtr vm,
79b470
             tmpPath = g_strdup(next->path);
79b470
 
79b470
             if (virDevMapperGetTargets(next->path, &targetPaths) < 0 &&
79b470
-                errno != ENOSYS && errno != EBADF) {
79b470
+                errno != ENOSYS) {
79b470
                 virReportSystemError(errno,
79b470
                                      _("Unable to get devmapper targets for %s"),
79b470
                                      next->path);
79b470
-- 
79b470
2.28.0
79b470