From: "Eric Bénard" <eric@eukrea.com>
To: barebox@lists.infradead.org
Subject: Re: [PATCH 2/3] defenv-2: Add usage information for bootargs scripts
Date: Thu, 5 Jul 2012 09:22:47 +0200 [thread overview]
Message-ID: <20120705092247.00cebe79@eb-e6520> (raw)
In-Reply-To: <1341472720-3248-3-git-send-email-s.hauer@pengutronix.de>
Hi Sascha,
Le Thu, 5 Jul 2012 09:18:39 +0200,
Sascha Hauer <s.hauer@pengutronix.de> a écrit :
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> defaultenv-2/base/bin/bootargs-root-initrd | 7 ++++++-
> defaultenv-2/base/bin/bootargs-root-jffs2 | 16 +++++++++++++++-
> defaultenv-2/base/bin/bootargs-root-nfs | 7 ++++++-
> defaultenv-2/base/bin/bootargs-root-ubi | 13 ++++++++++++-
> 4 files changed, 39 insertions(+), 4 deletions(-)
>
> diff --git a/defaultenv-2/base/bin/bootargs-root-initrd b/defaultenv-2/base/bin/bootargs-root-initrd
> index 4c59625..7072cea 100644
> --- a/defaultenv-2/base/bin/bootargs-root-initrd
> +++ b/defaultenv-2/base/bin/bootargs-root-initrd
> @@ -2,9 +2,14 @@
>
> rdinit="/sbin/init"
>
> -while getopt "i:" opt; do
> +usage="$0 [OPTIONS]\n -i <rdinitpath> (/sbin/init)"
> +
> +while getopt "i:h" opt; do
> if [ ${opt} = i ]; then
> rdinit=${OPTARG}
> + elif [ ${opt} = h ]; then
> + echo -e "$usage"
> + exit 0
> fi
> done
>
> diff --git a/defaultenv-2/base/bin/bootargs-root-jffs2 b/defaultenv-2/base/bin/bootargs-root-jffs2
> index db036da..ac9a4bd 100644
> --- a/defaultenv-2/base/bin/bootargs-root-jffs2
> +++ b/defaultenv-2/base/bin/bootargs-root-jffs2
> @@ -1,9 +1,23 @@
> #!/bin/sh
>
> -while getopt "m:" opt; do
> +mtd=
> +
> +usage="$0 [OPTIONS]\n -m <mtd>"
> +
> +while getopt "m:h" opt; do
> if [ ${opt} = m ]; then
> mtd=${OPTARG}
> + elif [ ${opt} = h ]; then
> + echo -e "$usage"
> + exit 0
> fi
> done
>
> +echo "huhu; $1"
is that huhu expected here ? ;-)
Eric
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-07-05 7:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-05 7:18 [PATCH] defenv-2 updates Sascha Hauer
2012-07-05 7:18 ` [PATCH 1/3] hush getopt: shift argv arguments Sascha Hauer
2012-07-05 7:18 ` [PATCH 2/3] defenv-2: Add usage information for bootargs scripts Sascha Hauer
2012-07-05 7:22 ` Eric Bénard [this message]
2012-07-05 7:35 ` Sascha Hauer
2012-07-05 7:18 ` [PATCH 3/3] defenv-2: improve boot script Sascha Hauer
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=20120705092247.00cebe79@eb-e6520 \
--to=eric@eukrea.com \
--cc=barebox@lists.infradead.org \
/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