*/
#include <errno.h>
-#include <libkmod.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
if (!ctx)
return 0;
- if (argc < 3 || !streq(argv[1], "load")) {
- log_error("%s: expected: load <module>", argv[0]);
- return EXIT_FAILURE;
- }
+ if (argc < 3 || !streq(argv[1], "load"))
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+ "%s: expected: load <module>", argv[0]);
for (i = 2; argv[i]; i++)
(void) module_load_and_warn(ctx, argv[i], false);
- return EXIT_SUCCESS;
+ return 0;
}
/* called at udev startup and reload */
return (kmod_validate_resources(ctx) != KMOD_RESOURCES_OK);
}
-const struct udev_builtin udev_builtin_kmod = {
+const UdevBuiltin udev_builtin_kmod = {
.name = "kmod",
.cmd = builtin_kmod,
.init = builtin_kmod_init,