summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-02-06 21:47:00 -0200
committerKay Sievers <kay.sievers@vrfy.org>2012-02-07 00:49:59 +0100
commit96b2eef25bb43c62f8d6b914a04fd72d8a968d65 (patch)
tree88b8ad94eea614a145a734ca876520eb397cf3e9 /src
parent6118dab105dcc91ae7efc038e8c3cb391e702468 (diff)
builtin: kmod - depend on libkmod >= 5
Diffstat (limited to 'src')
-rw-r--r--src/udev-builtin-kmod.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/udev-builtin-kmod.c b/src/udev-builtin-kmod.c
index d0a1f28e2f..57e813f863 100644
--- a/src/udev-builtin-kmod.c
+++ b/src/udev-builtin-kmod.c
@@ -36,7 +36,6 @@ static struct kmod_ctx *ctx;
static int load_module(struct udev *udev, const char *alias)
{
struct kmod_list *list = NULL;
- struct kmod_list *listb = NULL;
struct kmod_list *l;
int err;
@@ -44,20 +43,16 @@ static int load_module(struct udev *udev, const char *alias)
if (err < 0)
return err;
- err = kmod_module_get_filtered_blacklist(ctx, list, &listb);
- if (err < 0)
- return err;
-
if (list == NULL)
info(udev, "no module matches '%s'\n", alias);
- else if (listb == NULL)
- info(udev, "modules matching '%s' are blacklisted\n", alias);
- kmod_list_foreach(l, listb) {
+ kmod_list_foreach(l, list) {
struct kmod_module *mod = kmod_module_get_module(l);
- err = kmod_module_probe_insert_module(mod, 0, NULL, NULL, NULL);
- if (err >=0 )
+ err = kmod_module_probe_insert_module(mod, KMOD_PROBE_APPLY_BLACKLIST, NULL, NULL, NULL, NULL);
+ if (err == KMOD_PROBE_APPLY_BLACKLIST)
+ info(udev, "module '%s' is blacklisted\n", kmod_module_get_name(mod));
+ else if (err == 0)
info(udev, "inserted '%s'\n", kmod_module_get_name(mod));
else
info(udev, "failed to insert '%s'\n", kmod_module_get_name(mod));
@@ -66,7 +61,6 @@ static int load_module(struct udev *udev, const char *alias)
}
kmod_module_unref_list(list);
- kmod_module_unref_list(listb);
return err;
}