render / rpms / libvirt

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