static void systemd_kmod_log(void *data, int priority, const char *file, int line,
const char *fn, const char *format, va_list args)
{
- log_meta(priority, file, line, fn, format, args);
+ log_metav(priority, file, line, fn, format, args);
}
#pragma GCC diagnostic pop
char **t, **k;
k = strv_split(p, ",");
- if (!k) {
- log_error("Out of memory");
- return -ENOMEM;
- }
+ if (!k)
+ return log_oom();
t = strv_merge(arg_proc_cmdline_modules, k);
strv_free(k);
- if (!t) {
- log_error("Out of memory");
- return -ENOMEM;
- }
+ if (!t)
+ return log_oom();
strv_free(arg_proc_cmdline_modules);
arg_proc_cmdline_modules = t;
goto finish;
}
- if (startswith(word, "driver=")) {
+ if (startswith(word, "modules-load=")) {
- r = add_modules(word + 7);
+ r = add_modules(word + 13);
if (r < 0)
goto finish;
- } else if (startswith(word, "rd.driver=")) {
+ } else if (startswith(word, "rd.modules-load=")) {
if (in_initrd()) {
- r = add_modules(word + 10);
+ r = add_modules(word + 16);
if (r < 0)
goto finish;
}
if (!modlist) {
log_error("Failed to find module '%s'", m);
- return r;
+ return -ENOENT;
}
kmod_list_foreach(itr, modlist) {
int main(int argc, char *argv[]) {
int r = EXIT_FAILURE, k;
- char **files, **fn, **i;
+ char **files = NULL, **fn, **i;
struct kmod_ctx *ctx;
if (argc > 1) {