]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Use explicit non-char opt for --zero-super
authorNeilBrown <neilb@suse.de>
Mon, 9 Jul 2012 07:00:45 +0000 (17:00 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 9 Jul 2012 07:00:45 +0000 (17:00 +1000)
As we don't allow '-K' for '--zero-super' there is no point
using it internally.  Just define a 'KillOpt' like with
other options.

Signed-off-by: NeilBrown <neilb@suse.de>
ReadMe.c
mdadm.c
mdadm.h

index 1efc4470ea3afbad75407ffb4cff30ddc33d8dfb..fa71ec94c580aa332cff3f1092478dac70d58cba 100644 (file)
--- a/ReadMe.c
+++ b/ReadMe.c
@@ -86,7 +86,7 @@ struct option long_options[] = {
     {"follow",    0, 0, 'F'},
     {"grow",      0, 0, 'G'},
     {"incremental",0,0, 'I'},
-    {"zero-superblock", 0, 0, 'K'}, /* deliberately not a short_option */
+    {"zero-superblock", 0, 0, KillOpt}, /* deliberately not a short_option */
     {"query",    0, 0, 'Q'},
     {"examine-bitmap", 0, 0, 'X'},
     {"auto-detect", 0, 0, AutoDetect},
diff --git a/mdadm.c b/mdadm.c
index 846bc9641af062d7436721e72794cb66c3903521..31b7cfaa6c3a52a7054540644dfa15013105e321 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -252,7 +252,7 @@ int main(int argc, char *argv[])
                case KillSubarray:
                case UpdateSubarray:
                case UdevRules:
-               case 'K':
+               case KillOpt:
                        if (!mode)
                                newmode = MISC;
                        break;
@@ -932,7 +932,7 @@ int main(int argc, char *argv[])
                case O(MISC,'Q'):
                case O(MISC,'D'):
                case O(MISC,'E'):
-               case O(MISC,'K'):
+               case O(MISC,KillOpt):
                case O(MISC,'R'):
                case O(MISC,'S'):
                case O(MISC,'X'):
@@ -1562,7 +1562,7 @@ int main(int argc, char *argv[])
                                                     brief?1+verbose:0,
                                                     export, test, homehost, prefer);
                                        continue;
-                               case 'K': /* Zero superblock */
+                               case KillOpt: /* Zero superblock */
                                        if (ss)
                                                rv |= Kill(dv->devname, ss, force, quiet,0);
                                        else {
diff --git a/mdadm.h b/mdadm.h
index 4cf34ab1cfa3b28f592de004132c47e521477530..bda557dbfd76b529fc77d2bcdb580e549df627a3 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -323,6 +323,7 @@ enum special_options {
        Continue,
        OffRootOpt,
        Prefer,
+       KillOpt,
 };
 
 /* structures read from config file */