udev-builtin-kmod.c revision 06316d9f1a91b4d3efdb7402e72498cb3deb1806
/*
* load kernel modules
*
* Copyright (C) 2011 Kay Sievers <kay.sievers@vrfy.org>
*
* 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 "udev.h"
{
char *m[5];
if (argc < 3) {
return EXIT_FAILURE;
}
m[1] = "-bv";
m[3] = NULL;
switch(pid) {
case 0:
execv(m[0], m);
_exit(1);
case -1:
return EXIT_FAILURE;
default:
}
return EXIT_SUCCESS;
}
{
return 0;
}
{
return 0;
}
const struct udev_builtin udev_builtin_kmod = {
.name = "kmod",
.cmd = builtin_kmod,
.help = "kernel module loader",
.run_once = false,
};