udev-builtin-kmod.c revision 3f65d73149cd0f64eb3fdb0c71f55f6c1133fefe
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/*
* load kernel modules
*
* Copyright (C) 2011-2012 Kay Sievers <kay@vrfy.org>
* Copyright (C) 2011 ProFUSION embedded systems
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <errno.h>
#include <libkmod.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include "string-util.h"
#include "udev.h"
struct kmod_list *l;
int err;
if (err < 0)
return err;
kmod_list_foreach(l, list) {
if (err == KMOD_PROBE_APPLY_BLACKLIST)
else if (err == 0)
else
}
return err;
}
_printf_(6,0) static void udev_kmod_log(void *data, int priority, const char *file, int line, const char *fn, const char *format, va_list args) {
}
int i;
if (!ctx)
return 0;
return EXIT_FAILURE;
}
for (i = 2; argv[i]; i++) {
}
return EXIT_SUCCESS;
}
/* called at udev startup and reload */
if (ctx)
return 0;
if (!ctx)
return -ENOMEM;
log_debug("Load module index");
return 0;
}
/* called on udev shutdown and reload request */
log_debug("Unload module index");
}
/* called every couple of seconds during event activity; 'true' if config has changed */
log_debug("Validate module index");
if (!ctx)
return false;
}
const struct udev_builtin udev_builtin_kmod = {
.name = "kmod",
.cmd = builtin_kmod,
.help = "Kernel module loader",
.run_once = false,
};