On 01/22/12 12:22, NeilBrown wrote: > On Tue, 17 Jan 2012 11:48:49 +0100 Jes.Sorensen@xxxxxxxxxx wrote: > >> From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> >> >> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> >> --- >> mdmon.c | 13 +++++++++++++ >> 1 files changed, 13 insertions(+), 0 deletions(-) >> >> diff --git a/mdmon.c b/mdmon.c >> index a65c4a4..139bd85 100644 >> --- a/mdmon.c >> +++ b/mdmon.c >> @@ -276,6 +276,12 @@ void usage(void) >> exit(2); >> } >> >> +/* >> + * Option values that don't have a short version, to avoid clashing\ >> + * with ascii values > > The purpose of the trailing slosh (back slash) is ....? It was there to see if you were awake :) .... or because someone didn't see what he was doing. >> + */ >> +#define INITRD_OPT 0x100 > > Can we make this an enum just like in mdadm?? Sure - I will keep the value though, to avoid clashing with ascii. >> + >> static int mdmon(char *devname, int devnum, int must_fork, int takeover); >> >> int main(int argc, char *argv[]) >> @@ -283,6 +289,7 @@ int main(int argc, char *argv[]) >> char *container_name = NULL; >> int devnum; >> char *devname; >> + char *c; >> int status = 0; >> int opt; >> int all = 0; >> @@ -291,6 +298,7 @@ int main(int argc, char *argv[]) >> {"all", 0, NULL, 'a'}, >> {"takeover", 0, NULL, 't'}, >> {"help", 0, NULL, 'h'}, >> + {"initrd", 0, NULL, INITRD_OPT}, >> {NULL, 0, NULL, 0} >> }; >> >> @@ -304,6 +312,11 @@ int main(int argc, char *argv[]) >> container_name = optarg; >> takeover = 1; >> break; >> + case INITRD_OPT: >> + c = argv[0]; >> + c[0] = '@'; >> + continue; > > And can we use > argv[0][0] = '@'; > > here too? Sure > Otherwise looks good. Thanks, I'll update and also do the help message + man-page stuff. v2 coming up shortly. Cheers, Jes -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html