mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
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: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
d3e5c3605a
commit
fa5db009c9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user