Module Name: src
Committed By: kre
Date: Tue Jun 14 08:06:02 UTC 2022
Modified Files:
src/sbin/raidctl: raidctl.c
Log Message:
Reorder the getopts() switch () (slightly) to sort the options. NFCI.
To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sbin/raidctl/raidctl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/raidctl/raidctl.c
diff -u src/sbin/raidctl/raidctl.c:1.75 src/sbin/raidctl/raidctl.c:1.76
--- src/sbin/raidctl/raidctl.c:1.75 Tue Jun 14 08:05:55 2022
+++ src/sbin/raidctl/raidctl.c Tue Jun 14 08:06:01 2022
@@ -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++;