udev-builtin-kmod.c revision ad29a9f14fa8b1932c0e418bfcf1c10ce6a35a33
/*
* load kernel modules
*
* Copyright (C) 2011 Kay Sievers <kay.sievers@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 <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <libkmod.h>
#include "udev.h"
{
struct kmod_list *l;
int err;
if (err < 0)
return err;
if (err < 0)
return err;
kmod_list_foreach(l, listb) {
if (err >=0 )
else
}
return err;
}
{
}
/* needs to re-instantiate the context after a reload */
{
int i;
if (!ctx) {
if (!ctx)
return -ENOMEM;
}
return EXIT_FAILURE;
}
for (i = 2; argv[i]; i++) {
}
return EXIT_SUCCESS;
}
/* called at udev startup */
{
if (ctx)
return 0;
if (!ctx)
return -ENOMEM;
return 0;
}
/* called on udev shutdown and reload request */
{
}
/* called every couple of seconds during event activity; 'true' if config has changed */
{
return true;
return false;
}
const struct udev_builtin udev_builtin_kmod = {
.name = "kmod",
.cmd = builtin_kmod,
.help = "kernel module loader",
.run_once = false,
};