Mark functions as static

Mark functions used only in the same translation unit as static. This
only includes functions that do not have a prototype in a header file
either.

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
This commit is contained in:
Arvind Sankar
2020-06-15 14:30:37 -04:00
committed by Brian Behlendorf
parent 1fa5c7af33
commit 65c7cc49bf
62 changed files with 157 additions and 176 deletions
+4 -4
View File
@@ -806,7 +806,7 @@ libzfs_mnttab_init(libzfs_handle_t *hdl)
sizeof (mnttab_node_t), offsetof(mnttab_node_t, mtn_node));
}
int
static int
libzfs_mnttab_update(libzfs_handle_t *hdl)
{
struct mnttab entry;
@@ -1620,7 +1620,7 @@ error:
return (NULL);
}
int
static int
zfs_add_synthetic_resv(zfs_handle_t *zhp, nvlist_t *nvl)
{
uint64_t old_volsize;
@@ -2551,7 +2551,7 @@ struct get_clones_arg {
char buf[ZFS_MAX_DATASET_NAME_LEN];
};
int
static int
get_clones_cb(zfs_handle_t *zhp, void *arg)
{
struct get_clones_arg *gca = arg;
@@ -3129,7 +3129,7 @@ zfs_prop_get_int(zfs_handle_t *zhp, zfs_prop_t prop)
return (val);
}
int
static int
zfs_prop_set_int(zfs_handle_t *zhp, zfs_prop_t prop, uint64_t val)
{
char buf[64];
+1 -1
View File
@@ -38,7 +38,7 @@
#include "libzfs_impl.h"
int
static int
zfs_iter_clones(zfs_handle_t *zhp, zfs_iter_f func, void *data)
{
nvlist_t *nvl = zfs_get_clones_nvl(zhp);
+1 -1
View File
@@ -822,7 +822,7 @@ zfs_unshare_smb(zfs_handle_t *zhp, const char *mountpoint)
/*
* Same as zfs_unmountall(), but for NFS and SMB unshares.
*/
int
static int
zfs_unshareall_proto(zfs_handle_t *zhp, zfs_share_proto_t *proto)
{
prop_changelist_t *clp;
+2 -2
View File
@@ -445,7 +445,7 @@ bootfs_name_valid(const char *pool, const char *bootfs)
return (B_FALSE);
}
boolean_t
static boolean_t
zpool_is_bootable(zpool_handle_t *zhp)
{
char bootfs[ZFS_MAX_DATASET_NAME_LEN];
@@ -2141,7 +2141,7 @@ xlate_init_err(int err)
* Begin, suspend, or cancel the initialization (initializing of all free
* blocks) for the given vdevs in the given pool.
*/
int
static int
zpool_initialize_impl(zpool_handle_t *zhp, pool_initialize_func_t cmd_type,
nvlist_t *vds, boolean_t wait)
{
+2 -2
View File
@@ -2296,7 +2296,7 @@ err_out:
return (err);
}
zfs_handle_t *
static zfs_handle_t *
name_to_dir_handle(libzfs_handle_t *hdl, const char *snapname)
{
char dirname[ZFS_MAX_DATASET_NAME_LEN];
@@ -2877,7 +2877,7 @@ typedef struct guid_to_name_data {
uint64_t num_redact_snaps;
} guid_to_name_data_t;
boolean_t
static boolean_t
redact_snaps_match(zfs_handle_t *zhp, guid_to_name_data_t *gtnd)
{
uint64_t *bmark_snaps;
+1 -1
View File
@@ -1773,7 +1773,7 @@ typedef struct expand_data {
zfs_type_t type;
} expand_data_t;
int
static int
zprop_expand_list_cb(int prop, void *cb)
{
zprop_list_t *entry;