Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/raidctl Reorder the getopts() switch () (slightly) to s...



details:   https://anonhg.NetBSD.org/src/rev/c5f27a54540d
branches:  trunk
changeset: 366777:c5f27a54540d
user:      kre <kre%NetBSD.org@localhost>
date:      Tue Jun 14 08:06:01 2022 +0000

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

diffstat:

 sbin/raidctl/raidctl.c |  24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diffs (52 lines):

diff -r ecd26e70e74e -r c5f27a54540d sbin/raidctl/raidctl.c
--- a/sbin/raidctl/raidctl.c    Tue Jun 14 08:05:55 2022 +0000
+++ b/sbin/raidctl/raidctl.c    Tue Jun 14 08:06:01 2022 +0000
@@ -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 @@
                        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 @@
                        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++;



Home | Main Index | Thread Index | Old Index