libvirt/SOURCES/libvirt-virDevMapperGetTargets-Don-t-ignore-EBADF.patch

62 lines
2.5 KiB
Diff
Raw Normal View History

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