if (have_effective_cap(CAP_SYS_MODULE) <= 0)
return 0;
- _cleanup_(sym_kmod_unrefp) struct kmod_ctx *ctx = NULL;
+ _cleanup_(kmod_unrefp) struct kmod_ctx *ctx = NULL;
FOREACH_ELEMENT(kmod, kmod_table) {
if (kmod->path && access(kmod->path, F_OK) >= 0)
continue;
}
static int run(int argc, char *argv[]) {
- _cleanup_(sym_kmod_unrefp) struct kmod_ctx *ctx = NULL;
+ _cleanup_(kmod_unrefp) struct kmod_ctx *ctx = NULL;
int r, k;
r = parse_argv(argc, argv);
}
int module_load_and_warn(struct kmod_ctx *ctx, const char *module, bool verbose) {
- _cleanup_(sym_kmod_module_unref_listp) struct kmod_list *modlist = NULL;
+ _cleanup_(kmod_module_unref_listp) struct kmod_list *modlist = NULL;
_cleanup_strv_free_ char **denylist = NULL;
bool denylist_parsed = false;
struct kmod_list *itr;
"Failed to find module '%s'", module);
sym_kmod_list_foreach(itr, modlist) {
- _cleanup_(sym_kmod_module_unrefp) struct kmod_module *mod = NULL;
+ _cleanup_(kmod_module_unrefp) struct kmod_module *mod = NULL;
int state, err;
mod = sym_kmod_module_get_module(itr);
}
int module_setup_context(struct kmod_ctx **ret) {
- _cleanup_(sym_kmod_unrefp) struct kmod_ctx *ctx = NULL;
+ _cleanup_(kmod_unrefp) struct kmod_ctx *ctx = NULL;
int r;
assert(ret);
int dlopen_libkmod(void);
-DEFINE_TRIVIAL_CLEANUP_FUNC(struct kmod_ctx*, sym_kmod_unref);
-DEFINE_TRIVIAL_CLEANUP_FUNC(struct kmod_module*, sym_kmod_module_unref);
-DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct kmod_list*, sym_kmod_module_unref_list, NULL);
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(struct kmod_ctx*, sym_kmod_unref, kmod_unrefp, NULL);
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(struct kmod_module*, sym_kmod_module_unref, kmod_module_unrefp, NULL);
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(struct kmod_list*, sym_kmod_module_unref_list, kmod_module_unref_listp, NULL);
#define sym_kmod_list_foreach(list_entry, first_entry) \
for (list_entry = first_entry; \
#include "tests.h"
static int load_module(const char *mod_name) {
- _cleanup_(sym_kmod_unrefp) struct kmod_ctx *ctx = NULL;
- _cleanup_(sym_kmod_module_unref_listp) struct kmod_list *list = NULL;
+ _cleanup_(kmod_unrefp) struct kmod_ctx *ctx = NULL;
+ _cleanup_(kmod_module_unref_listp) struct kmod_list *list = NULL;
struct kmod_list *l;
int r;
return r;
sym_kmod_list_foreach(l, list) {
- _cleanup_(sym_kmod_module_unrefp) struct kmod_module *mod = NULL;
+ _cleanup_(kmod_module_unrefp) struct kmod_module *mod = NULL;
mod = sym_kmod_module_get_module(l);