From 681f9ba5c2d10f23a3919bc1a019e41dc24d5b05 Mon Sep 17 00:00:00 2001 From: kre Date: Tue, 14 Jun 2022 08:06:01 +0000 Subject: [PATCH] Reorder the getopts() switch () (slightly) to sort the options. NFCI. --- sbin/raidctl/raidctl.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sbin/raidctl/raidctl.c b/sbin/raidctl/raidctl.c index 2d5a0dd94223..205cd92014f8 100644 --- a/sbin/raidctl/raidctl.c +++ b/sbin/raidctl/raidctl.c @@ -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 #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++;