Reorder the getopts() switch () (slightly) to sort the options. NFCI.
This commit is contained in:
parent
ee1e729e87
commit
681f9ba5c2
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: raidctl.c,v 1.75 2022/06/14 08:05:55 kre Exp $ */
|
/* $NetBSD: raidctl.c,v 1.76 2022/06/14 08:06:01 kre Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
__RCSID("$NetBSD: raidctl.c,v 1.75 2022/06/14 08:05:55 kre Exp $");
|
__RCSID("$NetBSD: raidctl.c,v 1.76 2022/06/14 08:06:01 kre Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -223,6 +223,16 @@ main(int argc,char *argv[])
|
||||||
while (i < 3)
|
while (i < 3)
|
||||||
parityparams[i++] = 0;
|
parityparams[i++] = 0;
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
action = RAIDFRAME_CHECK_PARITY;
|
||||||
|
openmode = O_RDONLY;
|
||||||
|
num_options++;
|
||||||
|
break;
|
||||||
|
case 'P':
|
||||||
|
action = RAIDFRAME_CHECK_PARITY;
|
||||||
|
do_rewrite = 1;
|
||||||
|
num_options++;
|
||||||
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
action = RAIDFRAME_REMOVE_HOT_SPARE;
|
action = RAIDFRAME_REMOVE_HOT_SPARE;
|
||||||
get_comp(component, optarg, sizeof(component));
|
get_comp(component, optarg, sizeof(component));
|
||||||
|
@ -243,16 +253,6 @@ main(int argc,char *argv[])
|
||||||
openmode = O_RDONLY;
|
openmode = O_RDONLY;
|
||||||
num_options++;
|
num_options++;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
|
||||||
action = RAIDFRAME_CHECK_PARITY;
|
|
||||||
openmode = O_RDONLY;
|
|
||||||
num_options++;
|
|
||||||
break;
|
|
||||||
case 'P':
|
|
||||||
action = RAIDFRAME_CHECK_PARITY;
|
|
||||||
do_rewrite = 1;
|
|
||||||
num_options++;
|
|
||||||
break;
|
|
||||||
case 'u':
|
case 'u':
|
||||||
action = RAIDFRAME_SHUTDOWN;
|
action = RAIDFRAME_SHUTDOWN;
|
||||||
num_options++;
|
num_options++;
|
||||||
|
|
Loading…
Reference in New Issue