[PATCH 1/4] virdevmapper.c: Join two WITH_DEVMAPPER sections together

Michal Privoznik mprivozn at redhat.com
Mon Jul 27 08:31:09 UTC 2020


There are two distinct WITH_DEVMAPPER sections in the file, for
different functions each. Rearrange the code to make some of
future commits smaller.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
---
 src/util/virdevmapper.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/util/virdevmapper.c b/src/util/virdevmapper.c
index 40a82285f9..118dc82e94 100644
--- a/src/util/virdevmapper.c
+++ b/src/util/virdevmapper.c
@@ -195,19 +195,7 @@ virDevMapperGetTargets(const char *path,
     return virDevMapperGetTargetsImpl(path, devPaths, ttl);
 }
 
-#else /* ! WITH_DEVMAPPER */
 
-int
-virDevMapperGetTargets(const char *path G_GNUC_UNUSED,
-                       char ***devPaths G_GNUC_UNUSED)
-{
-    errno = ENOSYS;
-    return -1;
-}
-#endif /* ! WITH_DEVMAPPER */
-
-
-#if WITH_DEVMAPPER
 bool
 virIsDevMapperDevice(const char *dev_name)
 {
@@ -223,6 +211,15 @@ virIsDevMapperDevice(const char *dev_name)
 
 #else /* ! WITH_DEVMAPPER */
 
+int
+virDevMapperGetTargets(const char *path G_GNUC_UNUSED,
+                       char ***devPaths G_GNUC_UNUSED)
+{
+    errno = ENOSYS;
+    return -1;
+}
+
+
 bool
 virIsDevMapperDevice(const char *dev_name G_GNUC_UNUSED)
 {
-- 
2.26.2




More information about the libvir-list mailing list