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