]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virdevmapper.c: Join two WITH_DEVMAPPER sections together
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 23 Jul 2020 14:30:56 +0000 (16:30 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 25 Jul 2020 09:14:39 +0000 (11:14 +0200)
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@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/virdevmapper.c

index 40a82285f918ee452606e8617e6113931f3e8eba..118dc82e949e2c61f499d1f7e8a3fcfc955d819a 100644 (file)
@@ -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)
 {