diff options
author | Kay Sievers <kay@vrfy.org> | 2012-10-25 22:58:02 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-10-25 22:58:02 +0200 |
commit | 5b4d50efe83851fe84837db795e14b1d64be530b (patch) | |
tree | 1b145528361ddcd4804651e4dacaaa4a65c4f37b /src/udev/udev-builtin-kmod.c | |
parent | 3b0a5f2023cee149d2713327c04fc8103136bd91 (diff) |
udev: kmod, hwdb - do not fail if databases are not available
Diffstat (limited to 'src/udev/udev-builtin-kmod.c')
-rw-r--r-- | src/udev/udev-builtin-kmod.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/udev/udev-builtin-kmod.c b/src/udev/udev-builtin-kmod.c index 9d3605bc6b..1df055bea5 100644 --- a/src/udev/udev-builtin-kmod.c +++ b/src/udev/udev-builtin-kmod.c @@ -39,8 +39,6 @@ static int load_module(struct udev *udev, const char *alias) struct kmod_list *l; int err; - assert(ctx); - err = kmod_module_new_from_lookup(ctx, alias, &list); if (err < 0) return err; @@ -77,6 +75,9 @@ static int builtin_kmod(struct udev_device *dev, int argc, char *argv[], bool te struct udev *udev = udev_device_get_udev(dev); int i; + if (ctx) + return 0; + if (argc < 3 || strcmp(argv[1], "load")) { log_error("expect: %s load <module>\n", argv[0]); return EXIT_FAILURE; |