From: Michal Privoznik Date: Thu, 23 Jul 2020 14:30:56 +0000 (+0200) Subject: virdevmapper.c: Join two WITH_DEVMAPPER sections together X-Git-Tag: v6.6.0~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae5752aabc09f435675504246e30a0b9c4795d79;p=thirdparty%2Flibvirt.git virdevmapper.c: Join two WITH_DEVMAPPER sections together 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 Reviewed-by: Daniel P. Berrangé --- 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) {