aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenno Rice <benno@FreeBSD.org>2009-06-04 23:31:05 +0000
committerBenno Rice <benno@FreeBSD.org>2009-06-04 23:31:05 +0000
commit815d752a972b1d67d09ae39611d77fab19eb1800 (patch)
tree4cf794bc3a60d7f0789cd07d5ee9bed4c73a31c4
parentb962a0d6e0cbad5182dc7978a6e54462f96f01b7 (diff)
downloadsrc-815d752a972b1d67d09ae39611d77fab19eb1800.tar.gz
src-815d752a972b1d67d09ae39611d77fab19eb1800.zip
style(9) pass prior to further changes.
Sponsored by: Redacted Consulting
Notes
Notes: svn path=/head/; revision=193473
-rw-r--r--sbin/kldload/kldload.c69
1 files changed, 37 insertions, 32 deletions
diff --git a/sbin/kldload/kldload.c b/sbin/kldload/kldload.c
index 9e841bccf908..0f4bbbbf1ca0 100644
--- a/sbin/kldload/kldload.c
+++ b/sbin/kldload/kldload.c
@@ -27,55 +27,60 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/param.h>
+#include <sys/linker.h>
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <sys/param.h>
-#include <sys/linker.h>
+
+static void usage(void);
static void
usage(void)
{
- fprintf(stderr, "usage: kldload [-v] file ...\n");
- exit(1);
+ fprintf(stderr, "usage: kldload [-v] file ...\n");
+ exit(1);
}
int
main(int argc, char** argv)
{
- int c;
- int errors;
- int fileid;
- int verbose;
+ int c;
+ int errors;
+ int fileid;
+ int verbose;
- errors = 0;
- verbose = 0;
+ errors = 0;
+ verbose = 0;
- while ((c = getopt(argc, argv, "v")) != -1)
- switch (c) {
- case 'v':
- verbose = 1;
- break;
- default:
- usage();
+ while ((c = getopt(argc, argv, "v")) != -1) {
+ switch (c) {
+ case 'v':
+ verbose = 1;
+ break;
+ default:
+ usage();
+ }
}
- argc -= optind;
- argv += optind;
+ argc -= optind;
+ argv += optind;
- if (argc == 0)
- usage();
+ if (argc == 0)
+ usage();
- while (argc-- != 0) {
- fileid = kldload(argv[0]);
- if (fileid < 0) {
- warn("can't load %s", argv[0]);
- errors++;
- } else
- if (verbose)
- printf("Loaded %s, id=%d\n", argv[0], fileid);
- argv++;
- }
+ while (argc-- != 0) {
+ fileid = kldload(argv[0]);
+ if (fileid < 0) {
+ warn("can't load %s", argv[0]);
+ errors++;
+ } else {
+ if (verbose) {
+ printf("Loaded %s, id=%d\n", argv[0], fileid);
+ }
+ }
+ argv++;
+ }
- return errors ? 1 : 0;
+ return (errors ? 1 : 0);
}