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
1 changed files with 13 additions and 19 deletions

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
*/
static int
add_prop_list_default(const char *propname, char *propval, nvlist_t **props,
boolean_t poolprop)
add_prop_list_default(const char *propname, char *propval, nvlist_t **props)
{
char *pval;
@ -1501,7 +1500,7 @@ zpool_do_create(int argc, char **argv)
ZPOOL_PROP_ALTROOT), optarg, &props, B_TRUE))
goto errout;
if (add_prop_list_default(zpool_prop_to_name(
ZPOOL_PROP_CACHEFILE), "none", &props, B_TRUE))
ZPOOL_PROP_CACHEFILE), "none", &props))
goto errout;
break;
case 'm':
@ -1579,7 +1578,7 @@ zpool_do_create(int argc, char **argv)
ZPOOL_PROP_TNAME), optarg, &props, B_TRUE))
goto errout;
if (add_prop_list_default(zpool_prop_to_name(
ZPOOL_PROP_CACHEFILE), "none", &props, B_TRUE))
ZPOOL_PROP_CACHEFILE), "none", &props))
goto errout;
tname = optarg;
break;
@ -3618,7 +3617,7 @@ zpool_do_import(int argc, char **argv)
ZPOOL_PROP_ALTROOT), optarg, &props, B_TRUE))
goto error;
if (add_prop_list_default(zpool_prop_to_name(
ZPOOL_PROP_CACHEFILE), "none", &props, B_TRUE))
ZPOOL_PROP_CACHEFILE), "none", &props))
goto error;
break;
case 's':
@ -3627,7 +3626,7 @@ zpool_do_import(int argc, char **argv)
case 't':
flags |= ZFS_IMPORT_TEMP_NAME;
if (add_prop_list_default(zpool_prop_to_name(
ZPOOL_PROP_CACHEFILE), "none", &props, B_TRUE))
ZPOOL_PROP_CACHEFILE), "none", &props))
goto error;
break;
@ -4570,11 +4569,8 @@ single_histo_average(uint64_t *histo, unsigned int buckets)
}
static void
print_iostat_queues(iostat_cbdata_t *cb, nvlist_t *oldnv,
nvlist_t *newnv)
print_iostat_queues(iostat_cbdata_t *cb, nvlist_t *newnv)
{
int i;
uint64_t val;
const char *names[] = {
ZPOOL_CONFIG_VDEV_SYNC_R_PEND_QUEUE,
ZPOOL_CONFIG_VDEV_SYNC_R_ACTIVE_QUEUE,
@ -4604,8 +4600,8 @@ print_iostat_queues(iostat_cbdata_t *cb, nvlist_t *oldnv,
else
format = ZFS_NICENUM_1024;
for (i = 0; i < ARRAY_SIZE(names); i++) {
val = nva[i].data[0];
for (int i = 0; i < ARRAY_SIZE(names); i++) {
uint64_t val = nva[i].data[0];
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)
print_iostat_latency(cb, oldnv, newnv);
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) {
printf("\n");
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>.
*/
/* ARGSUSED */
int
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
* has the only valid copy of some data.
*/
/* ARGSUSED */
int
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
* state will not be persistent across reboots.
*/
/* ARGSUSED */
int
zpool_do_offline(int argc, char **argv)
{
@ -9084,7 +9077,6 @@ upgrade_list_disabled_cb(zpool_handle_t *zhp, void *arg)
return (0);
}
/* ARGSUSED */
static int
upgrade_one(zpool_handle_t *zhp, void *data)
{
@ -9849,7 +9841,7 @@ zpool_do_events_next(ev_opts_t *opts)
}
static int
zpool_do_events_clear(ev_opts_t *opts)
zpool_do_events_clear(void)
{
int count, ret;
@ -9916,7 +9908,7 @@ zpool_do_events(int argc, char **argv)
}
if (opts.clear)
ret = zpool_do_events_clear(&opts);
ret = zpool_do_events_clear();
else
ret = zpool_do_events_next(&opts);
@ -10854,6 +10846,8 @@ find_command_idx(char *command, int *idx)
static int
zpool_do_version(int argc, char **argv)
{
(void) argc, (void) argv;
if (zfs_version_print() == -1)
return (1);