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:
Maxime Henrion 2002-08-11 11:32:02 +00:00
parent ef3a89cfe8
commit 3dc4256892

View File

@ -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);
}