The kldload() system call doesn't return 0 when it succeeded,
so compare the return value against -1 to see if it failed instead of simply doing if (kldload("nfs")).
This commit is contained in:
parent
ef3a89cfe8
commit
3dc4256892
@ -81,7 +81,7 @@ main(int argc, char *argv[])
|
||||
|
||||
error = getvfsbyname("nfs", &vfc);
|
||||
if (error) {
|
||||
if (kldload("nfs"))
|
||||
if (kldload("nfs") == -1)
|
||||
err(1, "kldload(nfs)");
|
||||
error = getvfsbyname("nfs", &vfc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user