aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig/mdconfig.c
diff options
context:
space:
mode:
authorWojciech A. Koszek <wkoszek@FreeBSD.org>2006-03-26 22:52:36 +0000
committerWojciech A. Koszek <wkoszek@FreeBSD.org>2006-03-26 22:52:36 +0000
commit4bfd989f3e485e1c2f124342df8983e0ad6b2c14 (patch)
tree283780989820152d0f3263fb5e4e299bd84e4cee /sbin/mdconfig/mdconfig.c
parent63b01ffd348ad8a65e99ffbb793dea388681d96e (diff)
downloadsrc-4bfd989f3e485e1c2f124342df8983e0ad6b2c14.tar.gz
src-4bfd989f3e485e1c2f124342df8983e0ad6b2c14.zip
Keep proper order of includes. Additionally, sort them. Make functions used
in that file static. Approved by: cognet (mentor)
Notes
Notes: svn path=/head/; revision=157159
Diffstat (limited to 'sbin/mdconfig/mdconfig.c')
-rw-r--r--sbin/mdconfig/mdconfig.c43
1 files changed, 20 insertions, 23 deletions
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index 6ff770150727..7bf169c29b0f 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)
{