Putting something like "alias psmouse
deadbeef" is a hackish way to
blacklist a module. While I don't encourage doing so, let's not explode
if we fiund such config files.
A small difference from the behavior of module-init-tools: we exit with
0 instead of 1.
}
static DEFINE_TEST(modprobe_show_alias_to_none,
.description = "check if modprobe --show-depends doesn't explode with an alias to nothing",
- .expected_fail = true,
.config = {
[TC_UNAME_R] = "4.4.4",
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-modprobe/alias-to-none",
path = kmod_module_get_path(m);
if (path == NULL) {
- assert(kmod_module_get_initstate(m) == KMOD_MODULE_BUILTIN);
- printf("builtin %s\n", kmod_module_get_name(m));
+ /*
+ * Either a builtin module, or an alias, print only for
+ * builtin
+ */
+ if (kmod_module_get_initstate(m) == KMOD_MODULE_BUILTIN)
+ printf("builtin %s\n", kmod_module_get_name(m));
} else
printf("insmod %s %s\n", kmod_module_get_path(m), options);
}