render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
3cf992
From b578178e72373c13f4e1e819793e28b9d39fc2f2 Mon Sep 17 00:00:00 2001
3cf992
Message-Id: <b578178e72373c13f4e1e819793e28b9d39fc2f2@dist-git>
3cf992
From: Michal Privoznik <mprivozn@redhat.com>
3cf992
Date: Mon, 8 Mar 2021 12:57:29 +0100
3cf992
Subject: [PATCH] virdevmapper.c: Join two WITH_DEVMAPPER sections together
3cf992
MIME-Version: 1.0
3cf992
Content-Type: text/plain; charset=UTF-8
3cf992
Content-Transfer-Encoding: 8bit
3cf992
3cf992
There are two distinct WITH_DEVMAPPER sections in the file, for
3cf992
different functions each. Rearrange the code to make some of
3cf992
future commits smaller.
3cf992
3cf992
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
3cf992
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3cf992
(cherry picked from commit ae5752aabc09f435675504246e30a0b9c4795d79)
3cf992
3cf992
Conflicts:
3cf992
-src/util/virdevmapper.c: The old code uses ATTRIBUTE_UNUSED, the
3cf992
cherry picked commit used G_GNUC_UNUSED because of commit
3cf992
679f8b3994457f7801b470b7c6a3379d844d0f79 which is not backported.
3cf992
3cf992
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1933557
3cf992
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
3cf992
Message-Id: <675e510b0dfca0f4b4f3dc3ed3952b763182bad3.1615203117.git.mprivozn@redhat.com>
3cf992
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3cf992
---
3cf992
 src/util/virdevmapper.c | 21 +++++++++------------
3cf992
 1 file changed, 9 insertions(+), 12 deletions(-)
3cf992
3cf992
diff --git a/src/util/virdevmapper.c b/src/util/virdevmapper.c
3cf992
index c69830ac70..6aee00112c 100644
3cf992
--- a/src/util/virdevmapper.c
3cf992
+++ b/src/util/virdevmapper.c
3cf992
@@ -201,19 +201,7 @@ virDevMapperGetTargets(const char *path,
3cf992
     return virDevMapperGetTargetsImpl(path, devPaths, ttl);
3cf992
 }
3cf992
 
3cf992
-#else /* ! WITH_DEVMAPPER */
3cf992
-
3cf992
-int
3cf992
-virDevMapperGetTargets(const char *path ATTRIBUTE_UNUSED,
3cf992
-                       char ***devPaths ATTRIBUTE_UNUSED)
3cf992
-{
3cf992
-    errno = ENOSYS;
3cf992
-    return -1;
3cf992
-}
3cf992
-#endif /* ! WITH_DEVMAPPER */
3cf992
 
3cf992
-
3cf992
-#if WITH_DEVMAPPER
3cf992
 bool
3cf992
 virIsDevMapperDevice(const char *dev_name)
3cf992
 {
3cf992
@@ -229,6 +217,15 @@ virIsDevMapperDevice(const char *dev_name)
3cf992
 
3cf992
 #else /* ! WITH_DEVMAPPER */
3cf992
 
3cf992
+int
3cf992
+virDevMapperGetTargets(const char *path ATTRIBUTE_UNUSED,
3cf992
+                       char ***devPaths ATTRIBUTE_UNUSED)
3cf992
+{
3cf992
+    errno = ENOSYS;
3cf992
+    return -1;
3cf992
+}
3cf992
+
3cf992
+
3cf992
 bool
3cf992
 virIsDevMapperDevice(const char *dev_name G_GNUC_UNUSED)
3cf992
 {
3cf992
-- 
3cf992
2.31.0
3cf992