From ffc5432ffc2ec20ca1cb79edf0ec7cdffa193cbe Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 9 Jan 2014 15:35:35 +0000 Subject: [PATCH] Fix error counting --- sbin/kldload/kldload.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sbin/kldload/kldload.c b/sbin/kldload/kldload.c index dfde1f492ca0..6e88546bd4e3 100644 --- a/sbin/kldload/kldload.c +++ b/sbin/kldload/kldload.c @@ -181,14 +181,13 @@ main(int argc, char** argv) printf("%s is already " "loaded\n", argv[0]); } else { - if (errno == EEXIST) { + if (errno == EEXIST) warnx("can't load %s: module " "already loaded or " "in kernel", argv[0]); - } else { + else warn("can't load %s", argv[0]); - errors++; - } + errors++; } } else { if (verbose)