From f775ccfcf2fadfc1224405b676a8b64d2a19f3ad Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sat, 24 Dec 2011 03:51:05 +0100 Subject: [PATCH] builtin: kmod - reload index when rules are reloaded --- udev/udev-builtin-kmod.c | 2 +- udev/udevd.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/udev/udev-builtin-kmod.c b/udev/udev-builtin-kmod.c index 41de2ebc..10afcd5d 100644 --- a/udev/udev-builtin-kmod.c +++ b/udev/udev-builtin-kmod.c @@ -350,7 +350,7 @@ static int builtin_kmod_load(struct udev *udev) static int builtin_kmod_unload(struct udev *udev) { - kmod_unref(ctx); + ctx = kmod_unref(ctx); info(udev, "unload module index\n"); return 0; } diff --git a/udev/udevd.c b/udev/udevd.c index d1f7cd89..a5ef2441 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -1701,6 +1701,9 @@ int main(int argc, char *argv[]) rules = rules_new; } reload_config = 0; + + udev_builtin_unload(udev); + udev_builtin_load(udev); } } -- 2.39.5