From owner-svn-src-head@FreeBSD.ORG Thu Jun 4 23:31:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E927B1065672; Thu, 4 Jun 2009 23:31:05 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCD328FC16; Thu, 4 Jun 2009 23:31:05 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n54NV5mA007854; Thu, 4 Jun 2009 23:31:05 GMT (envelope-from benno@svn.freebsd.org) Received: (from benno@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n54NV5DH007853; Thu, 4 Jun 2009 23:31:05 GMT (envelope-from benno@svn.freebsd.org) Message-Id: <200906042331.n54NV5DH007853@svn.freebsd.org> From: Benno Rice Date: Thu, 4 Jun 2009 23:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193473 - head/sbin/kldload X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 23:31:06 -0000 Author: benno Date: Thu Jun 4 23:31:05 2009 New Revision: 193473 URL: http://svn.freebsd.org/changeset/base/193473 Log: style(9) pass prior to further changes. Sponsored by: Redacted Consulting Modified: head/sbin/kldload/kldload.c Modified: head/sbin/kldload/kldload.c ============================================================================== --- head/sbin/kldload/kldload.c Thu Jun 4 22:41:36 2009 (r193472) +++ head/sbin/kldload/kldload.c Thu Jun 4 23:31:05 2009 (r193473) @@ -27,55 +27,60 @@ #include __FBSDID("$FreeBSD$"); +#include +#include #include #include #include #include -#include -#include + +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; - - errors = 0; - verbose = 0; - - while ((c = getopt(argc, argv, "v")) != -1) - switch (c) { - case 'v': - verbose = 1; - break; - default: - usage(); + int c; + int errors; + int fileid; + int verbose; + + errors = 0; + verbose = 0; + + 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); }