Reorder the getopts() switch () (slightly) to sort the options. NFCI.

This commit is contained in:
kre 2022-06-14 08:06:01 +00:00
parent ee1e729e87
commit 681f9ba5c2
1 changed files with 12 additions and 12 deletions

View File

@ -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.
@ -39,7 +39,7 @@
#include <sys/cdefs.h>
#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
@ -223,6 +223,16 @@ main(int argc,char *argv[])
while (i < 3)
parityparams[i++] = 0;
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':
action = RAIDFRAME_REMOVE_HOT_SPARE;
get_comp(component, optarg, sizeof(component));
@ -243,16 +253,6 @@ main(int argc,char *argv[])
openmode = O_RDONLY;
num_options++;
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':
action = RAIDFRAME_SHUTDOWN;
num_options++;