From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org, dledford@redhat.com, kay@redhat.com,
harald@redhat.com, lpoetter@redhat.com, mschmidt@redhat.com
Subject: Re: [PATCH 3/4] Add --initrd argument to mdmon
Date: Mon, 23 Jan 2012 11:27:11 +0100 [thread overview]
Message-ID: <4F1D35FF.1070301@redhat.com> (raw)
In-Reply-To: <20120122222204.3156a3a7@notabene.brown>
On 01/22/12 12:22, NeilBrown wrote:
> On Tue, 17 Jan 2012 11:48:49 +0100 Jes.Sorensen@redhat.com wrote:
>
>> From: Jes Sorensen <Jes.Sorensen@redhat.com>
>>
>> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
>> ---
>> 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
next prev parent reply other threads:[~2012-01-23 10:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 10:48 [PATCH 0/4] add --initrd argument to mdadm/mdmon Jes.Sorensen
2012-01-17 10:48 ` [PATCH 1/4] mdmon: Use getopt_long() to parse command line options Jes.Sorensen
2012-01-17 10:48 ` [PATCH 2/4] Add --initrd argument to mdadm Jes.Sorensen
2012-01-18 8:13 ` Kwolek, Adam
2012-01-18 10:08 ` Jes Sorensen
2012-01-18 10:36 ` Kwolek, Adam
2012-01-18 16:43 ` Jes Sorensen
2012-01-18 16:46 ` Jes Sorensen
2012-01-19 7:25 ` Kwolek, Adam
2012-01-20 14:05 ` Jes Sorensen
2012-01-22 11:20 ` NeilBrown
2012-01-22 11:17 ` NeilBrown
2012-01-23 10:25 ` Jes Sorensen
2012-01-23 20:13 ` Lennart Poettering
2012-01-23 20:50 ` Kay Sievers
2012-01-25 10:53 ` Jes Sorensen
2012-01-25 11:37 ` NeilBrown
2012-01-25 13:34 ` Jes Sorensen
2012-01-17 10:48 ` [PATCH 3/4] Add --initrd argument to mdmon Jes.Sorensen
2012-01-22 11:22 ` NeilBrown
2012-01-23 10:27 ` Jes Sorensen [this message]
2012-01-17 10:48 ` [PATCH 4/4] Spawn mdmon with --initrd if mdadm was launched with --initrd Jes.Sorensen
2012-01-17 19:57 ` [PATCH 0/4] add --initrd argument to mdadm/mdmon Doug Ledford
2012-01-17 20:16 ` Jes Sorensen
2012-01-22 11:25 ` NeilBrown
2012-01-21 1:27 ` Lennart Poettering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F1D35FF.1070301@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=dledford@redhat.com \
--cc=harald@redhat.com \
--cc=kay@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=lpoetter@redhat.com \
--cc=mschmidt@redhat.com \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).