chiark / gitweb /
add builtin load/unload initializers
[elogind.git] / udev / udev-builtin.c
index 3682170..9f21727 100644 (file)
@@ -33,6 +33,26 @@ static const struct udev_builtin *builtins[] = {
        [UDEV_BUILTIN_KMOD] = &udev_builtin_kmod,
 };
 
+int udev_builtin_load(struct udev *udev)
+{
+       unsigned int i;
+
+       for (i = 0; i < ARRAY_SIZE(builtins); i++)
+               if (builtins[i]->load)
+                       builtins[i]->load(udev);
+       return 0;
+}
+
+int udev_builtin_unload(struct udev *udev)
+{
+       unsigned int i;
+
+       for (i = 0; i < ARRAY_SIZE(builtins); i++)
+               if (builtins[i]->unload)
+                       builtins[i]->unload(udev);
+       return 0;
+}
+
 int udev_builtin_list(struct udev *udev)
 {
        unsigned int i;