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>
This commit is contained in:
parent
5838058442
commit
f7d3febcd6
2
ReadMe.c
2
ReadMe.c
|
@ -86,7 +86,7 @@ struct option long_options[] = {
|
||||||
{"follow", 0, 0, 'F'},
|
{"follow", 0, 0, 'F'},
|
||||||
{"grow", 0, 0, 'G'},
|
{"grow", 0, 0, 'G'},
|
||||||
{"incremental",0,0, 'I'},
|
{"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'},
|
{"query", 0, 0, 'Q'},
|
||||||
{"examine-bitmap", 0, 0, 'X'},
|
{"examine-bitmap", 0, 0, 'X'},
|
||||||
{"auto-detect", 0, 0, AutoDetect},
|
{"auto-detect", 0, 0, AutoDetect},
|
||||||
|
|
6
mdadm.c
6
mdadm.c
|
@ -252,7 +252,7 @@ int main(int argc, char *argv[])
|
||||||
case KillSubarray:
|
case KillSubarray:
|
||||||
case UpdateSubarray:
|
case UpdateSubarray:
|
||||||
case UdevRules:
|
case UdevRules:
|
||||||
case 'K':
|
case KillOpt:
|
||||||
if (!mode)
|
if (!mode)
|
||||||
newmode = MISC;
|
newmode = MISC;
|
||||||
break;
|
break;
|
||||||
|
@ -932,7 +932,7 @@ int main(int argc, char *argv[])
|
||||||
case O(MISC,'Q'):
|
case O(MISC,'Q'):
|
||||||
case O(MISC,'D'):
|
case O(MISC,'D'):
|
||||||
case O(MISC,'E'):
|
case O(MISC,'E'):
|
||||||
case O(MISC,'K'):
|
case O(MISC,KillOpt):
|
||||||
case O(MISC,'R'):
|
case O(MISC,'R'):
|
||||||
case O(MISC,'S'):
|
case O(MISC,'S'):
|
||||||
case O(MISC,'X'):
|
case O(MISC,'X'):
|
||||||
|
@ -1562,7 +1562,7 @@ int main(int argc, char *argv[])
|
||||||
brief?1+verbose:0,
|
brief?1+verbose:0,
|
||||||
export, test, homehost, prefer);
|
export, test, homehost, prefer);
|
||||||
continue;
|
continue;
|
||||||
case 'K': /* Zero superblock */
|
case KillOpt: /* Zero superblock */
|
||||||
if (ss)
|
if (ss)
|
||||||
rv |= Kill(dv->devname, ss, force, quiet,0);
|
rv |= Kill(dv->devname, ss, force, quiet,0);
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue