summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@prydeworx.com>2018-11-08 07:51:21 +0100
committerSven Eden <sven.eden@prydeworx.com>2018-11-08 08:02:49 +0100
commitb384af76bc5adab5d9f153989de919a0956cc0b3 (patch)
tree9db39fbdb0602de83374ab1bedee3c6d74140664
parentcfe59ecd71d7198e07394f2ce8f93a705211f471 (diff)
Add missing test sources to the c::b project file
-rw-r--r--cb/elogind.cbp105
-rw-r--r--src/shared/module-util.c64
2 files changed, 31 insertions, 138 deletions
diff --git a/cb/elogind.cbp b/cb/elogind.cbp
index 387e057..00c0b04 100644
--- a/cb/elogind.cbp
+++ b/cb/elogind.cbp
@@ -296,9 +296,6 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="../src/basic/mount-util.h" />
- <Unit filename="../src/basic/os-util.c">
- <Option compilerVar="CC" />
- </Unit>
<Unit filename="../src/basic/os-util.h" />
<Unit filename="../src/basic/pager.c">
<Option compilerVar="CC" />
@@ -456,14 +453,14 @@
<Option target="all" />
<Option target="clean" />
</Unit>
- <Unit filename="../src/libelogind/libelogind.sym">
- <Option target="all" />
- <Option target="clean" />
+ <Unit filename="../src/libelogind/disable-mempool.c">
+ <Option compilerVar="CC" />
</Unit>
- <Unit filename="../src/libelogind/meson.build">
+ <Unit filename="../src/libelogind/libelogind.sym">
<Option target="all" />
<Option target="clean" />
</Unit>
+ <Unit filename="../src/libelogind/meson.build" />
<Unit filename="../src/libelogind/sd-bus/bus-common-errors.c">
<Option compilerVar="CC" />
<Option target="all" />
@@ -816,101 +813,55 @@
<Unit filename="../src/login/user-runtime-dir.h" />
<Unit filename="../src/shared/acl-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
- </Unit>
- <Unit filename="../src/shared/acl-util.h">
- <Option target="all" />
- <Option target="clean" />
</Unit>
+ <Unit filename="../src/shared/acl-util.h" />
<Unit filename="../src/shared/bus-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
- </Unit>
- <Unit filename="../src/shared/bus-util.h">
- <Option target="all" />
- <Option target="clean" />
</Unit>
+ <Unit filename="../src/shared/bus-util.h" />
<Unit filename="../src/shared/clean-ipc.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
- </Unit>
- <Unit filename="../src/shared/clean-ipc.h">
- <Option target="all" />
- <Option target="clean" />
</Unit>
+ <Unit filename="../src/shared/clean-ipc.h" />
<Unit filename="../src/shared/conf-parser.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
- <Unit filename="../src/shared/conf-parser.h">
- <Option target="all" />
- <Option target="clean" />
- </Unit>
- <Unit filename="../src/shared/libshared.sym">
- <Option target="all" />
- <Option target="clean" />
+ <Unit filename="../src/shared/conf-parser.h" />
+ <Unit filename="../src/shared/enable-mempool.c">
+ <Option compilerVar="CC" />
</Unit>
- <Unit filename="../src/shared/meson.build">
- <Option target="all" />
- <Option target="clean" />
+ <Unit filename="../src/shared/libshared.sym" />
+ <Unit filename="../src/shared/meson.build" />
+ <Unit filename="../src/shared/module-util.c">
+ <Option compilerVar="CC" />
</Unit>
<Unit filename="../src/shared/musl_missing.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
- </Unit>
- <Unit filename="../src/shared/musl_missing.h">
- <Option target="all" />
- <Option target="clean" />
</Unit>
+ <Unit filename="../src/shared/musl_missing.h" />
<Unit filename="../src/shared/nsflags.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
- <Unit filename="../src/shared/nsflags.h">
- <Option target="all" />
- <Option target="clean" />
+ <Unit filename="../src/shared/nsflags.h" />
+ <Unit filename="../src/shared/output-mode.c">
+ <Option compilerVar="CC" />
</Unit>
+ <Unit filename="../src/shared/output-mode.h" />
<Unit filename="../src/shared/sleep-config.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
- </Unit>
- <Unit filename="../src/shared/sleep-config.h">
- <Option target="all" />
- <Option target="clean" />
</Unit>
+ <Unit filename="../src/shared/sleep-config.h" />
<Unit filename="../src/shared/spawn-polkit-agent.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
- </Unit>
- <Unit filename="../src/shared/spawn-polkit-agent.h">
- <Option target="all" />
- <Option target="clean" />
- </Unit>
- <Unit filename="../src/shared/test-tables.h">
- <Option target="all" />
- <Option target="clean" />
- </Unit>
- <Unit filename="../src/shared/udev-util.h">
- <Option target="all" />
- <Option target="clean" />
</Unit>
+ <Unit filename="../src/shared/spawn-polkit-agent.h" />
+ <Unit filename="../src/shared/test-tables.h" />
+ <Unit filename="../src/shared/udev-util.h" />
<Unit filename="../src/shared/utmp-wtmp.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
- </Unit>
- <Unit filename="../src/shared/utmp-wtmp.h">
- <Option target="all" />
- <Option target="clean" />
</Unit>
+ <Unit filename="../src/shared/utmp-wtmp.h" />
+ <Unit filename="../src/shared/wireguard-netlink.h" />
<Unit filename="../src/sleep/sleep.c">
<Option compilerVar="CC" />
<Option target="all" />
@@ -973,6 +924,9 @@
<Unit filename="../src/test/test-cgroup.c">
<Option compilerVar="CC" />
</Unit>
+ <Unit filename="../src/test/test-chown-rec.c">
+ <Option compilerVar="CC" />
+ </Unit>
<Unit filename="../src/test/test-conf-files.c">
<Option compilerVar="CC" />
</Unit>
@@ -1069,6 +1023,9 @@
<Unit filename="../src/test/test-selinux.c">
<Option compilerVar="CC" />
</Unit>
+ <Unit filename="../src/test/test-set-disable-mempool.c">
+ <Option compilerVar="CC" />
+ </Unit>
<Unit filename="../src/test/test-set.c">
<Option compilerVar="CC" />
</Unit>
diff --git a/src/shared/module-util.c b/src/shared/module-util.c
deleted file mode 100644
index b203239..0000000
--- a/src/shared/module-util.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
-
-//#include <errno.h>
-
-//#include "module-util.h"
-
-int module_load_and_warn(struct kmod_ctx *ctx, const char *module) {
- const int probe_flags = KMOD_PROBE_APPLY_BLACKLIST;
- struct kmod_list *itr;
- _cleanup_(kmod_module_unref_listp) struct kmod_list *modlist = NULL;
- int r = 0;
-
- log_debug("Loading module: %s", module);
-
- r = kmod_module_new_from_lookup(ctx, module, &modlist);
- if (r < 0)
- return log_error_errno(r, "Failed to lookup module alias '%s': %m", module);
-
- if (!modlist) {
- log_error("Failed to find module '%s'", module);
- return -ENOENT;
- }
-
- kmod_list_foreach(itr, modlist) {
- _cleanup_(kmod_module_unrefp) struct kmod_module *mod = NULL;
- int state, err;
-
- mod = kmod_module_get_module(itr);
- state = kmod_module_get_initstate(mod);
-
- switch (state) {
- case KMOD_MODULE_BUILTIN:
- log_info("Module '%s' is builtin", kmod_module_get_name(mod));
- break;
-
- case KMOD_MODULE_LIVE:
- log_debug("Module '%s' is already loaded", kmod_module_get_name(mod));
- break;
-
- default:
- err = kmod_module_probe_insert_module(mod, probe_flags,
- NULL, NULL, NULL, NULL);
-
- if (err == 0)
- log_info("Inserted module '%s'", kmod_module_get_name(mod));
- else if (err == KMOD_PROBE_APPLY_BLACKLIST)
- log_info("Module '%s' is blacklisted", kmod_module_get_name(mod));
- else {
- assert(err < 0);
-
- log_full_errno(err == ENODEV ? LOG_NOTICE :
- err == ENOENT ? LOG_WARNING :
- LOG_ERR,
- err,
- "Failed to insert module '%s': %m",
- kmod_module_get_name(mod));
- if (!IN_SET(err, ENODEV, ENOENT))
- r = err;
- }
- }
- }
-
- return r;
-}