Correctly check the return value of kldload() to determine whether an

error occurred.
This commit is contained in:
Tim J. Robbins 2004-09-05 06:42:51 +00:00
parent 78cf5f2fcd
commit 95269a8951

View File

@ -103,7 +103,7 @@ main(int argc, char *argv[])
#else
error = getvfsbyname(SMBFS_VFSNAME, &vfc);
if (error) {
if (kldload(SMBFS_VFSNAME))
if (kldload(SMBFS_VFSNAME) < 0)
err(EX_OSERR, "kldload("SMBFS_VFSNAME")");
error = getvfsbyname(SMBFS_VFSNAME, &vfc);
}