Skip to content

Commit

Permalink
zpool: main: fix unused, remove argsused
Browse files Browse the repository at this point in the history
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#12835
  • Loading branch information
nabijaczleweli authored and nicman23 committed Aug 22, 2022
1 parent f245225 commit c55a32b
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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':
Expand All @@ -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;

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -6604,7 +6600,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)
{
Expand Down Expand Up @@ -6640,7 +6635,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)
{
Expand Down Expand Up @@ -6947,7 +6941,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)
{
Expand Down Expand Up @@ -9189,7 +9182,6 @@ upgrade_list_disabled_cb(zpool_handle_t *zhp, void *arg)
return (0);
}

/* ARGSUSED */
static int
upgrade_one(zpool_handle_t *zhp, void *data)
{
Expand Down Expand Up @@ -9954,7 +9946,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;

Expand Down Expand Up @@ -10021,7 +10013,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);

Expand Down Expand Up @@ -10968,6 +10960,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);

Expand Down

0 comments on commit c55a32b

Please sign in to comment.