diff options
author | Arvind Sankar <[email protected]> | 2020-06-15 14:30:37 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-06-18 12:20:38 -0700 |
commit | 65c7cc49bfcf49d38fc84552a17d7e8a3268e58e (patch) | |
tree | 4740b896f8b5fc114ae9a96c6581776799ffeb3a /cmd/zpool | |
parent | 1fa5c7af3314b4c556bd86e3a49e3497a5ed72ed (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Arvind Sankar <[email protected]>
Closes #10470
Diffstat (limited to 'cmd/zpool')
-rw-r--r-- | cmd/zpool/zpool_main.c | 22 | ||||
-rw-r--r-- | cmd/zpool/zpool_vdev.c | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index f13916f40..ee6c479eb 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -485,7 +485,7 @@ print_prop_cb(int prop, void *cb) * that command. Otherwise, iterate over the entire command table and display * a complete usage message. */ -void +static void usage(boolean_t requested) { FILE *fp = requested ? stdout : stderr; @@ -1689,7 +1689,7 @@ typedef struct export_cbdata { /* * Export one pool */ -int +static int zpool_export_one(zpool_handle_t *zhp, void *data) { export_cbdata_t *cb = data; @@ -3711,7 +3711,7 @@ default_column_width(iostat_cbdata_t *cb, enum iostat_type type) * If force_column_width is set, use it for the column width. If not set, use * the default column width. */ -void +static void print_iostat_labels(iostat_cbdata_t *cb, unsigned int force_column_width, const name_and_columns_t labels[][IOSTAT_MAX_LABELS]) { @@ -3783,7 +3783,7 @@ print_iostat_labels(iostat_cbdata_t *cb, unsigned int force_column_width, * sdc - - 0 0 5 473 val1 val2 * ---------- ----- ----- ----- ----- ----- ----- ---- ---- */ -void +static void print_cmd_columns(vdev_cmd_data_list_t *vcdl, int use_dashes) { int i, j; @@ -4633,7 +4633,7 @@ refresh_iostat(zpool_handle_t *zhp, void *data) /* * Callback to print out the iostats for the given pool. */ -int +static int print_iostat(zpool_handle_t *zhp, void *data) { iostat_cbdata_t *cb = data; @@ -5787,7 +5787,7 @@ print_one_column(zpool_prop_t prop, uint64_t value, const char *str, * print static default line per vdev * not compatible with '-o' <proplist> option */ -void +static void print_list_stats(zpool_handle_t *zhp, const char *name, nvlist_t *nv, list_cbdata_t *cb, int depth, boolean_t isspare) { @@ -5954,7 +5954,7 @@ print_list_stats(zpool_handle_t *zhp, const char *name, nvlist_t *nv, /* * Generic callback function to list a pool. */ -int +static int list_callback(zpool_handle_t *zhp, void *data) { list_cbdata_t *cbp = data; @@ -6858,7 +6858,7 @@ zpool_has_checkpoint(zpool_handle_t *zhp) return (B_FALSE); } -int +static int scrub_callback(zpool_handle_t *zhp, void *data) { scrub_cbdata_t *cb = data; @@ -7583,7 +7583,7 @@ print_dedup_stats(nvlist_t *config) * When given the '-v' option, we print out the complete config. If the '-e' * option is specified, then we print out error rate information as well. */ -int +static int status_callback(zpool_handle_t *zhp, void *data) { status_cbdata_t *cbp = data; @@ -9448,7 +9448,7 @@ typedef struct set_cbdata { boolean_t cb_any_successful; } set_cbdata_t; -int +static int set_callback(zpool_handle_t *zhp, void *data) { int error; @@ -9698,7 +9698,7 @@ print_wait_status_row(wait_data_t *wd, zpool_handle_t *zhp, int row) (void) fflush(stdout); } -void * +static void * wait_status_thread(void *arg) { wait_data_t *wd = (wait_data_t *)arg; diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c index a11fdd33c..9b5f4972f 100644 --- a/cmd/zpool/zpool_vdev.c +++ b/cmd/zpool/zpool_vdev.c @@ -1173,7 +1173,7 @@ is_grouping(const char *type, int *mindev, int *maxdev) * Note: we don't bother freeing anything in the error paths * because the program is just going to exit anyway. */ -nvlist_t * +static nvlist_t * construct_spec(nvlist_t *props, int argc, char **argv) { nvlist_t *nvroot, *nv, **top, **spares, **l2cache; |