render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
a41c76
From 4e021109613173e72df17eca6bff970ebb86b47f Mon Sep 17 00:00:00 2001
a41c76
Message-Id: <4e021109613173e72df17eca6bff970ebb86b47f@dist-git>
a41c76
From: Michal Privoznik <mprivozn@redhat.com>
a41c76
Date: Mon, 27 Jul 2020 12:36:50 +0200
a41c76
Subject: [PATCH] virdevmapper.c: Join two WITH_DEVMAPPER sections together
a41c76
MIME-Version: 1.0
a41c76
Content-Type: text/plain; charset=UTF-8
a41c76
Content-Transfer-Encoding: 8bit
a41c76
a41c76
There are two distinct WITH_DEVMAPPER sections in the file, for
a41c76
different functions each. Rearrange the code to make some of
a41c76
future commits smaller.
a41c76
a41c76
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
a41c76
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
a41c76
(cherry picked from commit ae5752aabc09f435675504246e30a0b9c4795d79)
a41c76
a41c76
https://bugzilla.redhat.com/show_bug.cgi?id=1860421
a41c76
a41c76
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
a41c76
Message-Id: <2b5410a10bb23e8a9526c663052afbb6f37b0a0c.1595846084.git.mprivozn@redhat.com>
a41c76
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
a41c76
---
a41c76
 src/util/virdevmapper.c | 21 +++++++++------------
a41c76
 1 file changed, 9 insertions(+), 12 deletions(-)
a41c76
a41c76
diff --git a/src/util/virdevmapper.c b/src/util/virdevmapper.c
a41c76
index 40a82285f9..118dc82e94 100644
a41c76
--- a/src/util/virdevmapper.c
a41c76
+++ b/src/util/virdevmapper.c
a41c76
@@ -195,19 +195,7 @@ virDevMapperGetTargets(const char *path,
a41c76
     return virDevMapperGetTargetsImpl(path, devPaths, ttl);
a41c76
 }
a41c76
 
a41c76
-#else /* ! WITH_DEVMAPPER */
a41c76
-
a41c76
-int
a41c76
-virDevMapperGetTargets(const char *path G_GNUC_UNUSED,
a41c76
-                       char ***devPaths G_GNUC_UNUSED)
a41c76
-{
a41c76
-    errno = ENOSYS;
a41c76
-    return -1;
a41c76
-}
a41c76
-#endif /* ! WITH_DEVMAPPER */
a41c76
 
a41c76
-
a41c76
-#if WITH_DEVMAPPER
a41c76
 bool
a41c76
 virIsDevMapperDevice(const char *dev_name)
a41c76
 {
a41c76
@@ -223,6 +211,15 @@ virIsDevMapperDevice(const char *dev_name)
a41c76
 
a41c76
 #else /* ! WITH_DEVMAPPER */
a41c76
 
a41c76
+int
a41c76
+virDevMapperGetTargets(const char *path G_GNUC_UNUSED,
a41c76
+                       char ***devPaths G_GNUC_UNUSED)
a41c76
+{
a41c76
+    errno = ENOSYS;
a41c76
+    return -1;
a41c76
+}
a41c76
+
a41c76
+
a41c76
 bool
a41c76
 virIsDevMapperDevice(const char *dev_name G_GNUC_UNUSED)
a41c76
 {
a41c76
-- 
a41c76
2.28.0
a41c76