diff options
author | mux <mux@FreeBSD.org> | 2002-08-11 11:32:02 +0000 |
---|---|---|
committer | mux <mux@FreeBSD.org> | 2002-08-11 11:32:02 +0000 |
commit | 544b3fb6045b998a316e58f4dc0ad30a05280df1 (patch) | |
tree | 75bb248fe568b2ff3b03d52ae15ae2a82c7185d8 /sbin | |
parent | 9f330c956febc5822317d5d625b86e4c575dd263 (diff) | |
download | FreeBSD-src-544b3fb6045b998a316e58f4dc0ad30a05280df1.zip FreeBSD-src-544b3fb6045b998a316e58f4dc0ad30a05280df1.tar.gz |
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")).
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/nfsiod/nfsiod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/nfsiod/nfsiod.c b/sbin/nfsiod/nfsiod.c index 15e5f76..eb2bca7 100644 --- a/sbin/nfsiod/nfsiod.c +++ b/sbin/nfsiod/nfsiod.c @@ -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); } |