diff options
author | NeilBrown <neilb@suse.de> | 2012-07-09 17:00:45 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-07-09 17:00:45 +1000 |
commit | f7d3febcd600d67f81bfe299498b8a13741d2bd0 (patch) | |
tree | 3cbd02b927082345a103c497a4ebc976f4260fe4 | |
parent | 58380584427d18544754466432bbc9a54a7d7742 (diff) |
Use explicit non-char opt for --zero-super
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>
-rw-r--r-- | ReadMe.c | 2 | ||||
-rw-r--r-- | mdadm.c | 6 | ||||
-rw-r--r-- | mdadm.h | 1 |
3 files changed, 5 insertions, 4 deletions
@@ -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}, @@ -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 { @@ -323,6 +323,7 @@ enum special_options { Continue, OffRootOpt, Prefer, + KillOpt, }; /* structures read from config file */ |