render / rpms / libvirt

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