summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/config/cmd.c6
-rw-r--r--usr.sbin/config/exec.c5
-rw-r--r--usr.sbin/config/exec_aout.c15
-rw-r--r--usr.sbin/config/exec_ecoff.c11
-rw-r--r--usr.sbin/config/exec_elf.c11
-rw-r--r--usr.sbin/config/files.c10
-rw-r--r--usr.sbin/config/hash.c4
-rw-r--r--usr.sbin/config/main.c6
-rw-r--r--usr.sbin/config/misc.c5
-rw-r--r--usr.sbin/config/mkheaders.c4
-rw-r--r--usr.sbin/config/mkioconf.c4
-rw-r--r--usr.sbin/config/mkmakefile.c4
-rw-r--r--usr.sbin/config/mkswap.c4
-rw-r--r--usr.sbin/config/pack.c4
-rw-r--r--usr.sbin/config/sem.c6
-rw-r--r--usr.sbin/config/ukc.c4
-rw-r--r--usr.sbin/config/ukcutil.c3
-rw-r--r--usr.sbin/config/util.c6
18 files changed, 70 insertions, 42 deletions
diff --git a/usr.sbin/config/cmd.c b/usr.sbin/config/cmd.c
index 843731159e5..13078c9633e 100644
--- a/usr.sbin/config/cmd.c
+++ b/usr.sbin/config/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.18 2009/12/10 22:07:19 kettenis Exp $ */
+/* $OpenBSD: cmd.c,v 1.19 2011/10/02 22:20:49 edd Exp $ */
/*
* Copyright (c) 1999-2001 Mats O Jansson. All rights reserved.
@@ -27,11 +27,13 @@
#include <sys/types.h>
#include <sys/device.h>
#include <sys/time.h>
+
#include <ctype.h>
-#include <stdio.h>
#include <limits.h>
#include <nlist.h>
+#include <stdio.h>
#include <string.h>
+
#include "misc.h"
#define CMD_NOEXTERN
#include "cmd.h"
diff --git a/usr.sbin/config/exec.c b/usr.sbin/config/exec.c
index 6bf3a6a00cc..e1a70257cbf 100644
--- a/usr.sbin/config/exec.c
+++ b/usr.sbin/config/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.8 2011/10/02 10:10:30 edd Exp $ */
+/* $OpenBSD: exec.c,v 1.9 2011/10/02 22:20:49 edd Exp $ */
/*
* Copyright (c) 1999 Mats O Jansson. All rights reserved.
@@ -24,9 +24,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <err.h>
#include <sys/types.h>
#include <sys/stat.h>
+
+#include <err.h>
#include <fcntl.h>
#include <stdio.h>
diff --git a/usr.sbin/config/exec_aout.c b/usr.sbin/config/exec_aout.c
index 6b538f246a0..5641d0a6329 100644
--- a/usr.sbin/config/exec_aout.c
+++ b/usr.sbin/config/exec_aout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_aout.c,v 1.10 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: exec_aout.c,v 1.11 2011/10/02 22:20:49 edd Exp $ */
/*
* Copyright (c) 1999 Mats O Jansson. All rights reserved.
@@ -24,15 +24,16 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/types.h>
+#include <sys/exec.h>
+
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <nlist.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
-#include <sys/exec.h>
-#include <sys/types.h>
#include "config.h"
#include "ukc.h"
@@ -80,8 +81,7 @@ aout_adjust(caddr_t x)
/* in-memory address -> ``kernel'' vaddr */
caddr_t
-aout_readjust(x)
- caddr_t x;
+aout_readjust(caddr_t x)
{
caddr_t y;
@@ -99,8 +99,7 @@ aout_readjust(x)
}
int
-aout_check(file)
- char *file;
+aout_check(char *file)
{
int fd, ret = 1;
diff --git a/usr.sbin/config/exec_ecoff.c b/usr.sbin/config/exec_ecoff.c
index e7230009272..72456c78b49 100644
--- a/usr.sbin/config/exec_ecoff.c
+++ b/usr.sbin/config/exec_ecoff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_ecoff.c,v 1.10 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: exec_ecoff.c,v 1.11 2011/10/02 22:20:49 edd Exp $ */
/*
* Copyright (c) 1999 Mats O Jansson. All rights reserved.
@@ -24,16 +24,17 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/types.h>
+#include <sys/exec.h>
+#include <sys/exec_ecoff.h>
+
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <nlist.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
-#include <sys/exec.h>
-#include <sys/exec_ecoff.h>
-#include <sys/types.h>
#include "config.h"
#include "ukc.h"
diff --git a/usr.sbin/config/exec_elf.c b/usr.sbin/config/exec_elf.c
index f84ef4c9fed..943a8e55280 100644
--- a/usr.sbin/config/exec_elf.c
+++ b/usr.sbin/config/exec_elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.c,v 1.12 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.13 2011/10/02 22:20:49 edd Exp $ */
/*
* Copyright (c) 1999 Mats O Jansson. All rights reserved.
@@ -24,16 +24,17 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/types.h>
+#include <sys/exec.h>
+#include <sys/exec_elf.h>
+
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <nlist.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
-#include <sys/exec.h>
-#include <sys/exec_elf.h>
-#include <sys/types.h>
#include "ukc.h"
#include "config.h"
diff --git a/usr.sbin/config/files.c b/usr.sbin/config/files.c
index b04e3c0b66e..1e7c1efcbb4 100644
--- a/usr.sbin/config/files.c
+++ b/usr.sbin/config/files.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: files.c,v 1.17 2010/06/02 20:42:17 chl Exp $ */
+/* $OpenBSD: files.c,v 1.18 2011/10/02 22:20:49 edd Exp $ */
/* $NetBSD: files.c,v 1.6 1996/03/17 13:18:17 cgd Exp $ */
/*
@@ -42,10 +42,12 @@
*/
#include <sys/param.h>
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#include "config.h"
extern const char *yyfile;
@@ -72,6 +74,10 @@ static int expr_eval(struct nvlist *,
int (*)(const char *, void *), void *);
static void expr_free(struct nvlist *);
+#ifdef DEBUG
+static void pr0();
+#endif
+
void
initfiles(void)
{
@@ -453,8 +459,6 @@ expr_free(struct nvlist *expr)
void
prexpr(struct nvlist *expr)
{
- static void pr0();
-
printf("expr =");
pr0(expr);
printf("\n");
diff --git a/usr.sbin/config/hash.c b/usr.sbin/config/hash.c
index 6da03b377cf..5111175af21 100644
--- a/usr.sbin/config/hash.c
+++ b/usr.sbin/config/hash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hash.c,v 1.14 2004/01/04 18:30:05 deraadt Exp $ */
+/* $OpenBSD: hash.c,v 1.15 2011/10/02 22:20:49 edd Exp $ */
/* $NetBSD: hash.c,v 1.4 1996/11/07 22:59:43 gwr Exp $ */
/*
@@ -42,8 +42,10 @@
*/
#include <sys/param.h>
+
#include <stdlib.h>
#include <string.h>
+
#include "config.h"
/*
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c
index b7212c22149..67b093b5acb 100644
--- a/usr.sbin/config/main.c
+++ b/usr.sbin/config/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.42 2011/04/15 02:48:14 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.43 2011/10/02 22:20:49 edd Exp $ */
/* $NetBSD: main.c,v 1.22 1997/02/02 21:12:33 thorpej Exp $ */
/*
@@ -44,13 +44,15 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
+
#include <ctype.h>
+#include <err.h>
#include <errno.h>
#include <stdio.h>
-#include <err.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+
#include "config.h"
int firstfile(const char *);
diff --git a/usr.sbin/config/misc.c b/usr.sbin/config/misc.c
index 9f465baf8b6..5972f4f9881 100644
--- a/usr.sbin/config/misc.c
+++ b/usr.sbin/config/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.8 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: misc.c,v 1.9 2011/10/02 22:20:49 edd Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -26,9 +26,10 @@
*/
#include <sys/types.h>
+
+#include <ctype.h>
#include <err.h>
#include <stdio.h>
-#include <ctype.h>
#include <stdlib.h>
#include <string.h>
diff --git a/usr.sbin/config/mkheaders.c b/usr.sbin/config/mkheaders.c
index 50793ba7e82..0572f604bdf 100644
--- a/usr.sbin/config/mkheaders.c
+++ b/usr.sbin/config/mkheaders.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkheaders.c,v 1.18 2003/06/28 04:55:07 deraadt Exp $ */
+/* $OpenBSD: mkheaders.c,v 1.19 2011/10/02 22:20:49 edd Exp $ */
/* $NetBSD: mkheaders.c,v 1.12 1997/02/02 21:12:34 thorpej Exp $ */
/*
@@ -42,11 +42,13 @@
*/
#include <sys/param.h>
+
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#include "config.h"
static int emitcnt(struct nvlist *);
diff --git a/usr.sbin/config/mkioconf.c b/usr.sbin/config/mkioconf.c
index d7cb9bda2b8..a5b8a7964e6 100644
--- a/usr.sbin/config/mkioconf.c
+++ b/usr.sbin/config/mkioconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkioconf.c,v 1.30 2011/07/16 11:34:43 chl Exp $ */
+/* $OpenBSD: mkioconf.c,v 1.31 2011/10/02 22:20:50 edd Exp $ */
/* $NetBSD: mkioconf.c,v 1.41 1996/11/11 14:18:49 mycroft Exp $ */
/*
@@ -42,10 +42,12 @@
*/
#include <sys/param.h>
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#include "config.h"
/*
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index 67918585d4d..55a705036d8 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkmakefile.c,v 1.35 2010/06/02 20:42:17 chl Exp $ */
+/* $OpenBSD: mkmakefile.c,v 1.36 2011/10/02 22:20:50 edd Exp $ */
/* $NetBSD: mkmakefile.c,v 1.34 1997/02/02 21:12:36 thorpej Exp $ */
/*
@@ -42,12 +42,14 @@
*/
#include <sys/param.h>
+
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#include "config.h"
#include "sem.h"
diff --git a/usr.sbin/config/mkswap.c b/usr.sbin/config/mkswap.c
index 52a3e7c7fbf..3b94ba41e17 100644
--- a/usr.sbin/config/mkswap.c
+++ b/usr.sbin/config/mkswap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkswap.c,v 1.12 2003/06/28 04:55:07 deraadt Exp $ */
+/* $OpenBSD: mkswap.c,v 1.13 2011/10/02 22:20:50 edd Exp $ */
/* $NetBSD: mkswap.c,v 1.5 1996/08/31 20:58:27 mycroft Exp $ */
/*
@@ -42,10 +42,12 @@
*/
#include <sys/param.h>
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#include "config.h"
#include "sem.h"
diff --git a/usr.sbin/config/pack.c b/usr.sbin/config/pack.c
index 2d9c1db512f..cd1937d3cae 100644
--- a/usr.sbin/config/pack.c
+++ b/usr.sbin/config/pack.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pack.c,v 1.15 2004/01/04 00:47:01 deraadt Exp $ */
+/* $OpenBSD: pack.c,v 1.16 2011/10/02 22:20:50 edd Exp $ */
/* $NetBSD: pack.c,v 1.5 1996/08/31 21:15:11 mycroft Exp $ */
/*
@@ -42,8 +42,10 @@
*/
#include <sys/param.h>
+
#include <stdlib.h>
#include <string.h>
+
#include "config.h"
/*
diff --git a/usr.sbin/config/sem.c b/usr.sbin/config/sem.c
index a3aff9f4f6a..6dad69182a4 100644
--- a/usr.sbin/config/sem.c
+++ b/usr.sbin/config/sem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sem.c,v 1.31 2008/03/24 21:35:03 maja Exp $ */
+/* $OpenBSD: sem.c,v 1.32 2011/10/02 22:20:50 edd Exp $ */
/* $NetBSD: sem.c,v 1.10 1996/11/11 23:40:11 gwr Exp $ */
/*
@@ -42,11 +42,13 @@
*/
#include <sys/param.h>
+
#include <ctype.h>
+#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <err.h>
+
#include "config.h"
#include "sem.h"
diff --git a/usr.sbin/config/ukc.c b/usr.sbin/config/ukc.c
index 1ff7be614f1..3b4367f1c30 100644
--- a/usr.sbin/config/ukc.c
+++ b/usr.sbin/config/ukc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukc.c,v 1.17 2011/10/02 10:10:30 edd Exp $ */
+/* $OpenBSD: ukc.c,v 1.18 2011/10/02 22:20:50 edd Exp $ */
/*
* Copyright (c) 1999-2001 Mats O Jansson. All rights reserved.
@@ -29,8 +29,8 @@
#include <sys/ioctl.h>
#include <err.h>
-#include <kvm.h>
#include <fcntl.h>
+#include <kvm.h>
#include <limits.h>
#include <nlist.h>
#include <stdio.h>
diff --git a/usr.sbin/config/ukcutil.c b/usr.sbin/config/ukcutil.c
index 50b356f477d..1dc02543647 100644
--- a/usr.sbin/config/ukcutil.c
+++ b/usr.sbin/config/ukcutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukcutil.c,v 1.19 2011/04/06 11:36:26 miod Exp $ */
+/* $OpenBSD: ukcutil.c,v 1.20 2011/10/02 22:20:50 edd Exp $ */
/*
* Copyright (c) 1999-2001 Mats O Jansson. All rights reserved.
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/device.h>
+
#include <limits.h>
#include <nlist.h>
#include <stdio.h>
diff --git a/usr.sbin/config/util.c b/usr.sbin/config/util.c
index 669a70ecfc6..56633058944 100644
--- a/usr.sbin/config/util.c
+++ b/usr.sbin/config/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.12 2003/06/28 04:55:07 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.13 2011/10/02 22:20:50 edd Exp $ */
/* $NetBSD: util.c,v 1.5 1996/08/31 20:58:29 mycroft Exp $ */
/*
@@ -42,11 +42,13 @@
*/
#include <sys/types.h>
+
#include <ctype.h>
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdarg.h>
+
#include "config.h"
static void nomem(void);