zpool: main: fix unused, remove argsused

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12835
This commit is contained in:
наб 2021-12-11 01:05:17 +01:00 committed by Brian Behlendorf
parent b487738d34
commit e40ca391f8

View File

@ -906,8 +906,7 @@ add_prop_list(const char *propname, char *propval, nvlist_t **props,
* Set a default property pair (name, string-value) in a property nvlist * Set a default property pair (name, string-value) in a property nvlist
*/ */
static int static int
add_prop_list_default(const char *propname, char *propval, nvlist_t **props, add_prop_list_default(const char *propname, char *propval, nvlist_t **props)
boolean_t poolprop)
{ {
char *pval; char *pval;
@ -1501,7 +1500,7 @@ zpool_do_create(int argc, char **argv)
ZPOOL_PROP_ALTROOT), optarg, &props, B_TRUE)) ZPOOL_PROP_ALTROOT), optarg, &props, B_TRUE))
goto errout; goto errout;
if (add_prop_list_default(zpool_prop_to_name( if (add_prop_list_default(zpool_prop_to_name(
ZPOOL_PROP_CACHEFILE), "none", &props, B_TRUE)) ZPOOL_PROP_CACHEFILE), "none", &props))
goto errout; goto errout;
break; break;
case 'm': case 'm':
@ -1579,7 +1578,7 @@ zpool_do_create(int argc, char **argv)
ZPOOL_PROP_TNAME), optarg, &props, B_TRUE)) ZPOOL_PROP_TNAME), optarg, &props, B_TRUE))
goto errout; goto errout;
if (add_prop_list_default(zpool_prop_to_name( if (add_prop_list_default(zpool_prop_to_name(
ZPOOL_PROP_CACHEFILE), "none", &props, B_TRUE)) ZPOOL_PROP_CACHEFILE), "none", &props))
goto errout; goto errout;
tname = optarg; tname = optarg;
break; break;
@ -3618,7 +3617,7 @@ zpool_do_import(int argc, char **argv)
ZPOOL_PROP_ALTROOT), optarg, &props, B_TRUE)) ZPOOL_PROP_ALTROOT), optarg, &props, B_TRUE))
goto error; goto error;
if (add_prop_list_default(zpool_prop_to_name( if (add_prop_list_default(zpool_prop_to_name(
ZPOOL_PROP_CACHEFILE), "none", &props, B_TRUE)) ZPOOL_PROP_CACHEFILE), "none", &props))
goto error; goto error;
break; break;
case 's': case 's':
@ -3627,7 +3626,7 @@ zpool_do_import(int argc, char **argv)
case 't': case 't':
flags |= ZFS_IMPORT_TEMP_NAME; flags |= ZFS_IMPORT_TEMP_NAME;
if (add_prop_list_default(zpool_prop_to_name( if (add_prop_list_default(zpool_prop_to_name(
ZPOOL_PROP_CACHEFILE), "none", &props, B_TRUE)) ZPOOL_PROP_CACHEFILE), "none", &props))
goto error; goto error;
break; break;
@ -4570,11 +4569,8 @@ single_histo_average(uint64_t *histo, unsigned int buckets)
} }
static void static void
print_iostat_queues(iostat_cbdata_t *cb, nvlist_t *oldnv, print_iostat_queues(iostat_cbdata_t *cb, nvlist_t *newnv)
nvlist_t *newnv)
{ {
int i;
uint64_t val;
const char *names[] = { const char *names[] = {
ZPOOL_CONFIG_VDEV_SYNC_R_PEND_QUEUE, ZPOOL_CONFIG_VDEV_SYNC_R_PEND_QUEUE,
ZPOOL_CONFIG_VDEV_SYNC_R_ACTIVE_QUEUE, ZPOOL_CONFIG_VDEV_SYNC_R_ACTIVE_QUEUE,
@ -4604,8 +4600,8 @@ print_iostat_queues(iostat_cbdata_t *cb, nvlist_t *oldnv,
else else
format = ZFS_NICENUM_1024; format = ZFS_NICENUM_1024;
for (i = 0; i < ARRAY_SIZE(names); i++) { for (int i = 0; i < ARRAY_SIZE(names); i++) {
val = nva[i].data[0]; uint64_t val = nva[i].data[0];
print_one_stat(val, format, column_width, cb->cb_scripted); print_one_stat(val, format, column_width, cb->cb_scripted);
} }
@ -4796,7 +4792,7 @@ print_vdev_stats(zpool_handle_t *zhp, const char *name, nvlist_t *oldnv,
if (cb->cb_flags & IOS_LATENCY_M) if (cb->cb_flags & IOS_LATENCY_M)
print_iostat_latency(cb, oldnv, newnv); print_iostat_latency(cb, oldnv, newnv);
if (cb->cb_flags & IOS_QUEUES_M) if (cb->cb_flags & IOS_QUEUES_M)
print_iostat_queues(cb, oldnv, newnv); print_iostat_queues(cb, newnv);
if (cb->cb_flags & IOS_ANYHISTO_M) { if (cb->cb_flags & IOS_ANYHISTO_M) {
printf("\n"); printf("\n");
print_iostat_histos(cb, oldnv, newnv, scale, name); print_iostat_histos(cb, oldnv, newnv, scale, name);
@ -6596,7 +6592,6 @@ zpool_do_attach_or_replace(int argc, char **argv, int replacing)
* *
* Replace <device> with <new_device>. * Replace <device> with <new_device>.
*/ */
/* ARGSUSED */
int int
zpool_do_replace(int argc, char **argv) zpool_do_replace(int argc, char **argv)
{ {
@ -6632,7 +6627,6 @@ zpool_do_attach(int argc, char **argv)
* is the last device in the mirror, or if the DTLs indicate that this device * is the last device in the mirror, or if the DTLs indicate that this device
* has the only valid copy of some data. * has the only valid copy of some data.
*/ */
/* ARGSUSED */
int int
zpool_do_detach(int argc, char **argv) zpool_do_detach(int argc, char **argv)
{ {
@ -6939,7 +6933,6 @@ zpool_do_online(int argc, char **argv)
* -t Only take the device off-line temporarily. The offline/faulted * -t Only take the device off-line temporarily. The offline/faulted
* state will not be persistent across reboots. * state will not be persistent across reboots.
*/ */
/* ARGSUSED */
int int
zpool_do_offline(int argc, char **argv) zpool_do_offline(int argc, char **argv)
{ {
@ -9084,7 +9077,6 @@ upgrade_list_disabled_cb(zpool_handle_t *zhp, void *arg)
return (0); return (0);
} }
/* ARGSUSED */
static int static int
upgrade_one(zpool_handle_t *zhp, void *data) upgrade_one(zpool_handle_t *zhp, void *data)
{ {
@ -9849,7 +9841,7 @@ zpool_do_events_next(ev_opts_t *opts)
} }
static int static int
zpool_do_events_clear(ev_opts_t *opts) zpool_do_events_clear(void)
{ {
int count, ret; int count, ret;
@ -9916,7 +9908,7 @@ zpool_do_events(int argc, char **argv)
} }
if (opts.clear) if (opts.clear)
ret = zpool_do_events_clear(&opts); ret = zpool_do_events_clear();
else else
ret = zpool_do_events_next(&opts); ret = zpool_do_events_next(&opts);
@ -10854,6 +10846,8 @@ find_command_idx(char *command, int *idx)
static int static int
zpool_do_version(int argc, char **argv) zpool_do_version(int argc, char **argv)
{ {
(void) argc, (void) argv;
if (zfs_version_print() == -1) if (zfs_version_print() == -1)
return (1); return (1);