summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author0xAX <0xAX@users.noreply.github.com>2017-09-09 03:51:04 +0600
committerLennart Poettering <lennart@poettering.net>2017-09-08 23:51:04 +0200
commit95441cf2ed2406c00e3e94f1991992e63c2507c9 (patch)
tree5304b8cf33b5c825d1f411c086274f05e30e3c06 /src
parent912a0f21d9e98f4d2a19b74254e93dea8a5fd727 (diff)
downloadsystemd-95441cf2ed2406c00e3e94f1991992e63c2507c9.tar.gz
kmod-setup: define has_virtio_rng() only in a case when HAVE_KMOD is enabled (#6784)
in other way we will get a warning message: ../src/core/kmod-setup.c:83:13: warning: ‘has_virtio_rng’ defined but not used [-Wunused-function] static bool has_virtio_rng(void) { ^~~~~~~~~~~~~~
Diffstat (limited to 'src')
-rw-r--r--src/core/kmod-setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
index 9f69a6d925..30b42fffe5 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -47,7 +47,6 @@ static void systemd_kmod_log(
log_internalv(LOG_DEBUG, 0, file, line, fn, format, args);
REENABLE_WARNING;
}
-#endif
static int has_virtio_rng_nftw_cb(
const char *fpath,
@@ -83,6 +82,7 @@ static int has_virtio_rng_nftw_cb(
static bool has_virtio_rng(void) {
return (nftw("/sys/devices/pci0000:00", has_virtio_rng_nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL) == FTW_STOP);
}
+#endif
int kmod_setup(void) {
#ifdef HAVE_KMOD