diff options
author | wkoszek <wkoszek@FreeBSD.org> | 2006-03-26 22:52:36 +0000 |
---|---|---|
committer | wkoszek <wkoszek@FreeBSD.org> | 2006-03-26 22:52:36 +0000 |
commit | 096cd178c10e12657491e485585f6e930deb4c48 (patch) | |
tree | 283780989820152d0f3263fb5e4e299bd84e4cee /sbin | |
parent | ebefd0941153ad65b8e1e9ce6921455e33c8caa8 (diff) | |
download | FreeBSD-src-096cd178c10e12657491e485585f6e930deb4c48.zip FreeBSD-src-096cd178c10e12657491e485585f6e930deb4c48.tar.gz |
Keep proper order of includes. Additionally, sort them. Make functions used
in that file static.
Approved by: cognet (mentor)
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/mdconfig/mdconfig.c | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c index 6ff7701..7bf169c 100644 --- a/sbin/mdconfig/mdconfig.c +++ b/sbin/mdconfig/mdconfig.c @@ -9,36 +9,33 @@ * $FreeBSD$ * */ +#include <sys/param.h> +#include <sys/ioctl.h> +#include <sys/linker.h> +#include <sys/mdioctl.h> +#include <sys/module.h> +#include <sys/stat.h> -#include <stdio.h> -#include <stdlib.h> +#include <assert.h> +#include <err.h> #include <errno.h> #include <fcntl.h> -#include <unistd.h> #include <inttypes.h> #include <libutil.h> +#include <stdio.h> +#include <stdlib.h> #include <string.h> -#include <err.h> -#include <assert.h> - -#include <sys/ioctl.h> -#include <sys/param.h> -#include <sys/module.h> -#include <sys/linker.h> -#include <sys/mdioctl.h> -#include <sys/stat.h> - -int list(const int); -int query(const int, const int); -void usage(void); - -struct md_ioctl mdio; +#include <unistd.h> -enum {UNSET, ATTACH, DETACH, LIST} action = UNSET; +static int list(const int); +static int query(const int, const int); +static void usage(void); -int nflag; +static struct md_ioctl mdio; +static enum {UNSET, ATTACH, DETACH, LIST} action = UNSET; +static int nflag; -void +static void usage() { fprintf(stderr, @@ -277,7 +274,7 @@ mdunitcmp(const void *a, const void *b) return (*(int *)a - *(int *)b); } -int +static int list(const int fd) { int unit; @@ -308,7 +305,7 @@ prthumanval(int64_t bytes) (void)printf("%6s", buf); } -int +static int query(const int fd, const int unit) { |