From 6b1235713e366fa41a69505839d5e7284711544b Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar <marcel@FreeBSD.org> Date: Mon, 3 Oct 2016 02:37:28 +0000 Subject: [PATCH] Prefer <stdint.h> over <sys/types.h>. While here remove redundant inclusion of <sys/queue.h>. Move the inclusion of the disk partitioning headers out of order and inbetween standard headers and local header. They will change in a subsequent commit. --- usr.bin/mkimg/apm.c | 5 +++-- usr.bin/mkimg/bsd.c | 5 +++-- usr.bin/mkimg/ebr.c | 5 +++-- usr.bin/mkimg/format.c | 1 - usr.bin/mkimg/gpt.c | 6 +++--- usr.bin/mkimg/image.c | 2 -- usr.bin/mkimg/mbr.c | 5 +++-- usr.bin/mkimg/mkimg.c | 3 +-- usr.bin/mkimg/pc98.c | 5 +++-- usr.bin/mkimg/qcow.c | 1 - usr.bin/mkimg/raw.c | 2 +- usr.bin/mkimg/scheme.c | 1 - usr.bin/mkimg/vhd.c | 2 +- usr.bin/mkimg/vmdk.c | 1 - usr.bin/mkimg/vtoc8.c | 5 +++-- 15 files changed, 24 insertions(+), 25 deletions(-) diff --git a/usr.bin/mkimg/apm.c b/usr.bin/mkimg/apm.c index 14b60e25acc7..8e5e43ffb4c9 100644 --- a/usr.bin/mkimg/apm.c +++ b/usr.bin/mkimg/apm.c @@ -27,13 +27,14 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> -#include <sys/apm.h> #include <sys/errno.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/apm.h> + #include "endian.h" #include "image.h" #include "mkimg.h" diff --git a/usr.bin/mkimg/bsd.c b/usr.bin/mkimg/bsd.c index 95aa1aa8e9a4..1377b20d26f1 100644 --- a/usr.bin/mkimg/bsd.c +++ b/usr.bin/mkimg/bsd.c @@ -27,13 +27,14 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> -#include <sys/disklabel.h> #include <sys/errno.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/disklabel.h> + #include "endian.h" #include "image.h" #include "mkimg.h" diff --git a/usr.bin/mkimg/ebr.c b/usr.bin/mkimg/ebr.c index d45e6eab6d09..be2f3bc4171d 100644 --- a/usr.bin/mkimg/ebr.c +++ b/usr.bin/mkimg/ebr.c @@ -27,13 +27,14 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> -#include <sys/diskmbr.h> #include <sys/errno.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/diskmbr.h> + #include "endian.h" #include "image.h" #include "mkimg.h" diff --git a/usr.bin/mkimg/format.c b/usr.bin/mkimg/format.c index 010da7c11235..00139ebc075c 100644 --- a/usr.bin/mkimg/format.c +++ b/usr.bin/mkimg/format.c @@ -27,7 +27,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> #include <sys/stat.h> #include <err.h> #include <errno.h> diff --git a/usr.bin/mkimg/gpt.c b/usr.bin/mkimg/gpt.c index c3a7e2916cf8..58fc337962c4 100644 --- a/usr.bin/mkimg/gpt.c +++ b/usr.bin/mkimg/gpt.c @@ -27,10 +27,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> -#include <sys/diskmbr.h> #include <sys/errno.h> -#include <sys/gpt.h> #include <stddef.h> #include <stdint.h> #include <stdlib.h> @@ -38,6 +35,9 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> #include <uuid.h> +#include <sys/diskmbr.h> +#include <sys/gpt.h> + #include "endian.h" #include "image.h" #include "mkimg.h" diff --git a/usr.bin/mkimg/image.c b/usr.bin/mkimg/image.c index becb4e9bef35..3e132e862eee 100644 --- a/usr.bin/mkimg/image.c +++ b/usr.bin/mkimg/image.c @@ -28,9 +28,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mman.h> -#include <sys/queue.h> #include <sys/stat.h> -#include <sys/types.h> #include <assert.h> #include <err.h> #include <errno.h> diff --git a/usr.bin/mkimg/mbr.c b/usr.bin/mkimg/mbr.c index 81dfebf5a705..548437d6c406 100644 --- a/usr.bin/mkimg/mbr.c +++ b/usr.bin/mkimg/mbr.c @@ -27,13 +27,14 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> -#include <sys/diskmbr.h> #include <sys/errno.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/diskmbr.h> + #include "endian.h" #include "image.h" #include "mkimg.h" diff --git a/usr.bin/mkimg/mkimg.c b/usr.bin/mkimg/mkimg.c index 84f2e83a2c30..31e826296343 100644 --- a/usr.bin/mkimg/mkimg.c +++ b/usr.bin/mkimg/mkimg.c @@ -27,9 +27,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/queue.h> #include <sys/stat.h> -#include <sys/types.h> #include <sys/uuid.h> #include <errno.h> #include <err.h> @@ -37,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include <getopt.h> #include <libutil.h> #include <limits.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/usr.bin/mkimg/pc98.c b/usr.bin/mkimg/pc98.c index 09f90b600659..867c8b1ebcbf 100644 --- a/usr.bin/mkimg/pc98.c +++ b/usr.bin/mkimg/pc98.c @@ -27,13 +27,14 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> -#include <sys/diskpc98.h> #include <sys/errno.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/diskpc98.h> + #include "endian.h" #include "image.h" #include "mkimg.h" diff --git a/usr.bin/mkimg/qcow.c b/usr.bin/mkimg/qcow.c index b41c2d2da07d..a2fb86c62e2a 100644 --- a/usr.bin/mkimg/qcow.c +++ b/usr.bin/mkimg/qcow.c @@ -27,7 +27,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> #include <sys/errno.h> #include <assert.h> #include <stdint.h> diff --git a/usr.bin/mkimg/raw.c b/usr.bin/mkimg/raw.c index 5686f79a6760..adeb690157a6 100644 --- a/usr.bin/mkimg/raw.c +++ b/usr.bin/mkimg/raw.c @@ -27,8 +27,8 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> #include <sys/errno.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> diff --git a/usr.bin/mkimg/scheme.c b/usr.bin/mkimg/scheme.c index 34047e751bc5..3e2ab46df405 100644 --- a/usr.bin/mkimg/scheme.c +++ b/usr.bin/mkimg/scheme.c @@ -27,7 +27,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> #include <sys/stat.h> #include <assert.h> #include <err.h> diff --git a/usr.bin/mkimg/vhd.c b/usr.bin/mkimg/vhd.c index 822c8fdd9f08..bc8d02b47fd0 100644 --- a/usr.bin/mkimg/vhd.c +++ b/usr.bin/mkimg/vhd.c @@ -27,8 +27,8 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> #include <sys/errno.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <time.h> diff --git a/usr.bin/mkimg/vmdk.c b/usr.bin/mkimg/vmdk.c index 0f963de5b2a0..ce0d7b32c81e 100644 --- a/usr.bin/mkimg/vmdk.c +++ b/usr.bin/mkimg/vmdk.c @@ -27,7 +27,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> #include <sys/errno.h> #include <stdint.h> #include <stdio.h> diff --git a/usr.bin/mkimg/vtoc8.c b/usr.bin/mkimg/vtoc8.c index 11295a903bc1..a7409b8551d2 100644 --- a/usr.bin/mkimg/vtoc8.c +++ b/usr.bin/mkimg/vtoc8.c @@ -27,14 +27,15 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> #include <sys/errno.h> -#include <sys/vtoc.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/vtoc.h> + #include "endian.h" #include "image.h" #include "mkimg.h"