diff options
author | Arvind Sankar <[email protected]> | 2020-06-11 16:25:39 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-06-18 12:21:25 -0700 |
commit | 60356b1a211a0fcfe7dbd2e1dd280d6fc0170cf0 (patch) | |
tree | ca3cd9430efffadd0f1a98994c3d864ce16076b0 | |
parent | c3fe42aabd9f8879500437e2be2968b47e8b6797 (diff) |
Add include files for prototypes
Include the header with prototypes in the file that provides definitions
as well, to catch any mismatch between prototype and definition.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Arvind Sankar <[email protected]>
Closes #10470
-rw-r--r-- | cmd/zed/zed_event.c | 1 | ||||
-rw-r--r-- | cmd/zed/zed_exec.c | 1 | ||||
-rw-r--r-- | cmd/zed/zed_exec.h | 1 | ||||
-rw-r--r-- | cmd/zed/zed_file.c | 1 | ||||
-rw-r--r-- | lib/libshare/nfs.c | 1 | ||||
-rw-r--r-- | lib/libspl/os/freebsd/getexecname.c | 11 | ||||
-rw-r--r-- | lib/libspl/os/linux/getexecname.c | 5 | ||||
-rw-r--r-- | lib/libzfs/os/freebsd/libzfs_zmount.c | 2 | ||||
-rw-r--r-- | module/icp/io/edonr_mod.c | 1 | ||||
-rw-r--r-- | module/icp/io/sha1_mod.c | 1 | ||||
-rw-r--r-- | module/icp/io/skein_mod.c | 1 | ||||
-rw-r--r-- | module/os/freebsd/spl/spl_vm.c | 1 | ||||
-rw-r--r-- | module/os/linux/spl/spl-generic.c | 1 | ||||
-rw-r--r-- | module/zcommon/zfs_prop.c | 1 | ||||
-rw-r--r-- | module/zcommon/zpool_prop.c | 1 | ||||
-rw-r--r-- | module/zfs/blkptr.c | 1 | ||||
-rw-r--r-- | module/zfs/dmu_object.c | 1 | ||||
-rw-r--r-- | module/zfs/edonr_zfs.c | 2 | ||||
-rw-r--r-- | module/zfs/gzip.c | 1 | ||||
-rw-r--r-- | module/zfs/lz4.c | 1 | ||||
-rw-r--r-- | module/zfs/lzjb.c | 1 | ||||
-rw-r--r-- | module/zfs/sha256.c | 1 | ||||
-rw-r--r-- | module/zfs/skein_zfs.c | 1 | ||||
-rw-r--r-- | module/zfs/spa_boot.c | 2 | ||||
-rw-r--r-- | module/zfs/zcp_get.c | 1 | ||||
-rw-r--r-- | module/zfs/zle.c | 1 |
26 files changed, 34 insertions, 9 deletions
diff --git a/cmd/zed/zed_event.c b/cmd/zed/zed_event.c index 2a7ff16fd..197c25386 100644 --- a/cmd/zed/zed_event.c +++ b/cmd/zed/zed_event.c @@ -28,6 +28,7 @@ #include "zed.h" #include "zed_conf.h" #include "zed_disk_event.h" +#include "zed_event.h" #include "zed_exec.h" #include "zed_file.h" #include "zed_log.h" diff --git a/cmd/zed/zed_exec.c b/cmd/zed/zed_exec.c index 037037168..08b7b5568 100644 --- a/cmd/zed/zed_exec.c +++ b/cmd/zed/zed_exec.c @@ -22,6 +22,7 @@ #include <sys/wait.h> #include <time.h> #include <unistd.h> +#include "zed_exec.h" #include "zed_file.h" #include "zed_log.h" #include "zed_strings.h" diff --git a/cmd/zed/zed_exec.h b/cmd/zed/zed_exec.h index 69179c92c..4153e5519 100644 --- a/cmd/zed/zed_exec.h +++ b/cmd/zed/zed_exec.h @@ -16,6 +16,7 @@ #define ZED_EXEC_H #include <stdint.h> +#include "zed_strings.h" int zed_exec_process(uint64_t eid, const char *class, const char *subclass, const char *dir, zed_strings_t *zedlets, zed_strings_t *envs, diff --git a/cmd/zed/zed_file.c b/cmd/zed/zed_file.c index 3a1a661fa..c3cf3d421 100644 --- a/cmd/zed/zed_file.c +++ b/cmd/zed/zed_file.c @@ -20,6 +20,7 @@ #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> +#include "zed_file.h" #include "zed_log.h" /* diff --git a/lib/libshare/nfs.c b/lib/libshare/nfs.c index 7cc5ae43f..c45f25cd0 100644 --- a/lib/libshare/nfs.c +++ b/lib/libshare/nfs.c @@ -35,6 +35,7 @@ #include <libzfs.h> #include <libshare.h> #include "libshare_impl.h" +#include "nfs.h" static boolean_t nfs_available(void); diff --git a/lib/libspl/os/freebsd/getexecname.c b/lib/libspl/os/freebsd/getexecname.c index 13e50d324..2b057cc73 100644 --- a/lib/libspl/os/freebsd/getexecname.c +++ b/lib/libspl/os/freebsd/getexecname.c @@ -21,14 +21,15 @@ */ -#include <string.h> -#include <unistd.h> -#include <pthread.h> +#include <errno.h> #include <limits.h> +#include <pthread.h> +#include <stdlib.h> +#include <string.h> #include <sys/param.h> -#include <sys/types.h> #include <sys/sysctl.h> -#include <errno.h> +#include <sys/types.h> +#include <unistd.h> const char * getexecname(void) diff --git a/lib/libspl/os/linux/getexecname.c b/lib/libspl/os/linux/getexecname.c index c21a110ad..6352a1a34 100644 --- a/lib/libspl/os/linux/getexecname.c +++ b/lib/libspl/os/linux/getexecname.c @@ -25,10 +25,11 @@ */ +#include <limits.h> +#include <pthread.h> +#include <stdlib.h> #include <string.h> #include <unistd.h> -#include <pthread.h> -#include <limits.h> const char * getexecname(void) diff --git a/lib/libzfs/os/freebsd/libzfs_zmount.c b/lib/libzfs/os/freebsd/libzfs_zmount.c index c6415b8b8..2207fffc5 100644 --- a/lib/libzfs/os/freebsd/libzfs_zmount.c +++ b/lib/libzfs/os/freebsd/libzfs_zmount.c @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include <sys/errno.h> #include <libzfs.h> +#include "libzfs_impl.h" + static void build_iovec(struct iovec **iov, int *iovlen, const char *name, void *val, size_t len) diff --git a/module/icp/io/edonr_mod.c b/module/icp/io/edonr_mod.c index 544814a98..a806af610 100644 --- a/module/icp/io/edonr_mod.c +++ b/module/icp/io/edonr_mod.c @@ -25,6 +25,7 @@ #include <sys/modctl.h> #include <sys/crypto/common.h> +#include <sys/crypto/icp.h> #include <sys/crypto/spi.h> #include <sys/sysmacros.h> #include <sys/edonr.h> diff --git a/module/icp/io/sha1_mod.c b/module/icp/io/sha1_mod.c index d0b23cb78..ffae143cd 100644 --- a/module/icp/io/sha1_mod.c +++ b/module/icp/io/sha1_mod.c @@ -27,6 +27,7 @@ #include <sys/zfs_context.h> #include <sys/modctl.h> #include <sys/crypto/common.h> +#include <sys/crypto/icp.h> #include <sys/crypto/spi.h> #include <sha1/sha1.h> diff --git a/module/icp/io/skein_mod.c b/module/icp/io/skein_mod.c index 621fa6158..18026807f 100644 --- a/module/icp/io/skein_mod.c +++ b/module/icp/io/skein_mod.c @@ -25,6 +25,7 @@ #include <sys/modctl.h> #include <sys/crypto/common.h> +#include <sys/crypto/icp.h> #include <sys/crypto/spi.h> #include <sys/sysmacros.h> #define SKEIN_MODULE_IMPL diff --git a/module/os/freebsd/spl/spl_vm.c b/module/os/freebsd/spl/spl_vm.c index cd18ebb7a..9f7acab74 100644 --- a/module/os/freebsd/spl/spl_vm.c +++ b/module/os/freebsd/spl/spl_vm.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include <sys/byteorder.h> #include <sys/lock.h> #include <sys/freebsd_rwlock.h> +#include <sys/vm.h> #include <vm/vm.h> #include <vm/vm_param.h> diff --git a/module/os/linux/spl/spl-generic.c b/module/os/linux/spl/spl-generic.c index 837447239..aa74f6042 100644 --- a/module/os/linux/spl/spl-generic.c +++ b/module/os/linux/spl/spl-generic.c @@ -39,6 +39,7 @@ #include <sys/proc.h> #include <sys/kstat.h> #include <sys/file.h> +#include <sys/sunddi.h> #include <linux/ctype.h> #include <sys/disp.h> #include <sys/random.h> diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c index d62eec3f0..3a005b687 100644 --- a/module/zcommon/zfs_prop.c +++ b/module/zcommon/zfs_prop.c @@ -857,6 +857,7 @@ zfs_prop_valid_keylocation(const char *str, boolean_t encrypted) #ifndef _KERNEL +#include <libzfs.h> /* * Returns a string describing the set of acceptable values for the given diff --git a/module/zcommon/zpool_prop.c b/module/zcommon/zpool_prop.c index 155d557f4..3cfb435e4 100644 --- a/module/zcommon/zpool_prop.c +++ b/module/zcommon/zpool_prop.c @@ -235,6 +235,7 @@ zpool_prop_random_value(zpool_prop_t prop, uint64_t seed) } #ifndef _KERNEL +#include <libzfs.h> const char * zpool_prop_values(zpool_prop_t prop) diff --git a/module/zfs/blkptr.c b/module/zfs/blkptr.c index ee24b1c31..73600e4ab 100644 --- a/module/zfs/blkptr.c +++ b/module/zfs/blkptr.c @@ -17,6 +17,7 @@ * Copyright (c) 2013, 2016 by Delphix. All rights reserved. */ +#include <sys/blkptr.h> #include <sys/zfs_context.h> #include <sys/zio.h> #include <sys/zio_compress.h> diff --git a/module/zfs/dmu_object.c b/module/zfs/dmu_object.c index be4eba91c..453a2842c 100644 --- a/module/zfs/dmu_object.c +++ b/module/zfs/dmu_object.c @@ -26,6 +26,7 @@ #include <sys/dbuf.h> #include <sys/dmu.h> +#include <sys/dmu_impl.h> #include <sys/dmu_objset.h> #include <sys/dmu_tx.h> #include <sys/dnode.h> diff --git a/module/zfs/edonr_zfs.c b/module/zfs/edonr_zfs.c index e92da6d6c..aa00e1c94 100644 --- a/module/zfs/edonr_zfs.c +++ b/module/zfs/edonr_zfs.c @@ -27,8 +27,8 @@ */ #include <sys/zfs_context.h> #include <sys/zio.h> +#include <sys/zio_checksum.h> #include <sys/edonr.h> -#include <sys/zfs_context.h> /* For CTASSERT() */ #include <sys/abd.h> #define EDONR_MODE 512 diff --git a/module/zfs/gzip.c b/module/zfs/gzip.c index 9d8af3228..e2c6e5996 100644 --- a/module/zfs/gzip.c +++ b/module/zfs/gzip.c @@ -30,6 +30,7 @@ #include <sys/types.h> #include <sys/strings.h> #include <sys/qat.h> +#include <sys/zio_compress.h> #ifdef _KERNEL diff --git a/module/zfs/lz4.c b/module/zfs/lz4.c index 953c440df..52e527b02 100644 --- a/module/zfs/lz4.c +++ b/module/zfs/lz4.c @@ -33,6 +33,7 @@ */ #include <sys/zfs_context.h> +#include <sys/zio_compress.h> static int real_LZ4_compress(const char *source, char *dest, int isize, int osize); diff --git a/module/zfs/lzjb.c b/module/zfs/lzjb.c index ae1846701..a478e64c5 100644 --- a/module/zfs/lzjb.c +++ b/module/zfs/lzjb.c @@ -37,6 +37,7 @@ */ #include <sys/zfs_context.h> +#include <sys/zio_compress.h> #define MATCH_BITS 6 #define MATCH_MIN 3 diff --git a/module/zfs/sha256.c b/module/zfs/sha256.c index 406c926a0..d297768ea 100644 --- a/module/zfs/sha256.c +++ b/module/zfs/sha256.c @@ -28,6 +28,7 @@ */ #include <sys/zfs_context.h> #include <sys/zio.h> +#include <sys/zio_checksum.h> #include <sys/sha2.h> #include <sys/abd.h> #include <sys/qat.h> diff --git a/module/zfs/skein_zfs.c b/module/zfs/skein_zfs.c index 8deb84b26..11b9940e0 100644 --- a/module/zfs/skein_zfs.c +++ b/module/zfs/skein_zfs.c @@ -24,6 +24,7 @@ */ #include <sys/zfs_context.h> #include <sys/zio.h> +#include <sys/zio_checksum.h> #include <sys/skein.h> #include <sys/abd.h> diff --git a/module/zfs/spa_boot.c b/module/zfs/spa_boot.c index be79542c9..674394650 100644 --- a/module/zfs/spa_boot.c +++ b/module/zfs/spa_boot.c @@ -27,7 +27,7 @@ #ifdef _KERNEL #include <sys/zio.h> -#include <sys/spa.h> +#include <sys/spa_boot.h> #include <sys/sunddi.h> char * diff --git a/module/zfs/zcp_get.c b/module/zfs/zcp_get.c index a23230ffb..7256e4de1 100644 --- a/module/zfs/zcp_get.c +++ b/module/zfs/zcp_get.c @@ -34,6 +34,7 @@ #include <sys/zcp.h> #include <sys/zcp_iter.h> #include <sys/zcp_global.h> +#include <sys/zcp_prop.h> #include <sys/zfs_ioctl.h> #include <sys/zfs_znode.h> #include <sys/zvol.h> diff --git a/module/zfs/zle.c b/module/zfs/zle.c index 613607faa..0decebb13 100644 --- a/module/zfs/zle.c +++ b/module/zfs/zle.c @@ -32,6 +32,7 @@ */ #include <sys/types.h> #include <sys/sysmacros.h> +#include <sys/zio_compress.h> size_t zle_compress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) |