11
int main(int argc, char *argv[])
15
struct kmod_module *mod;
19
fprintf(stderr, "Provide a path to a module\n");
25
ctx = kmod_new(NULL, NULL);
29
printf("libkmod version %s\n", VERSION);
31
err = kmod_module_new_from_path(ctx, path, &mod);
37
printf("Trying insmod '%s' (%s)\n", kmod_module_get_name(mod),
38
kmod_module_get_path(mod));
39
err = kmod_module_insert_module(mod, 0, NULL);
41
fprintf(stderr, "%s\n", strerror(-err));
43
kmod_module_unref(mod);
48
kmod_module_unref(mod);