提交 fa5db009 编写于 作者: M Michal Privoznik

virkmodtest: Don't fail if modprobe doesn't exist

On some very basic installations (e.g. some container images) the
modprobe binary might be missing. If that is the case, don't fail
virkmodtest.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 d3e5c360
......@@ -46,7 +46,12 @@ testKModConfig(const void *args ATTRIBUTE_UNUSED)
*/
outbuf = virKModConfig();
if (!outbuf) {
fprintf(stderr, "Failed to get config\n");
if (virFileIsExecutable(MODPROBE)) {
fprintf(stderr, "Failed to get config\n");
} else {
/* modprobe doesn't exist, do not claim error. */
ret = 0;
}
goto cleanup;
}
ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册