Skip to content

Commit

Permalink
Add include files for prototypes
Browse files Browse the repository at this point in the history
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 <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10470
  • Loading branch information
nivedita76 authored and behlendorf committed Jun 18, 2020
1 parent c3fe42a commit 60356b1
Show file tree
Hide file tree
Showing 26 changed files with 34 additions and 9 deletions.
1 change: 1 addition & 0 deletions cmd/zed/zed_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions cmd/zed/zed_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions cmd/zed/zed_exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions cmd/zed/zed_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "zed_file.h"
#include "zed_log.h"

/*
Expand Down
1 change: 1 addition & 0 deletions lib/libshare/nfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <libzfs.h>
#include <libshare.h>
#include "libshare_impl.h"
#include "nfs.h"

static boolean_t nfs_available(void);

Expand Down
11 changes: 6 additions & 5 deletions lib/libspl/os/freebsd/getexecname.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions lib/libspl/os/linux/getexecname.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions lib/libzfs/os/freebsd/libzfs_zmount.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions module/icp/io/edonr_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions module/icp/io/sha1_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions module/icp/io/skein_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions module/os/freebsd/spl/spl_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions module/os/linux/spl/spl-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions module/zcommon/zfs_prop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions module/zcommon/zpool_prop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions module/zfs/blkptr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions module/zfs/dmu_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/edonr_zfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions module/zfs/gzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <sys/types.h>
#include <sys/strings.h>
#include <sys/qat.h>
#include <sys/zio_compress.h>

#ifdef _KERNEL

Expand Down
1 change: 1 addition & 0 deletions module/zfs/lz4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions module/zfs/lzjb.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
*/

#include <sys/zfs_context.h>
#include <sys/zio_compress.h>

#define MATCH_BITS 6
#define MATCH_MIN 3
Expand Down
1 change: 1 addition & 0 deletions module/zfs/sha256.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions module/zfs/skein_zfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/spa_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#ifdef _KERNEL

#include <sys/zio.h>
#include <sys/spa.h>
#include <sys/spa_boot.h>
#include <sys/sunddi.h>

char *
Expand Down
1 change: 1 addition & 0 deletions module/zfs/zcp_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions module/zfs/zle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 60356b1

Please sign in to comment.