From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] part: Add support for list filtering on bootable partitions
Date: Mon, 23 Feb 2015 17:40:19 -0700 [thread overview]
Message-ID: <54EBC873.7030206@wwwdotorg.org> (raw)
In-Reply-To: <1424379221-2378-2-git-send-email-sjoerd.simons@collabora.co.uk>
On 02/19/2015 01:53 PM, Sjoerd Simons wrote:
> Add an optional -bootable parameter to the part list commands to only
> put the list of bootable partitions in the environment variable
> diff --git a/common/cmd_part.c b/common/cmd_part.c
> + for (i = 2; i < argc; i++) {
> + if (argv[i][0] == '-') {
> + if (!strcmp(argv[i], "-bootable")) {
> + bootable = true;
> + } else {
> + printf("Unknown option %s\n", argv[i]);
> + return CMD_RET_USAGE;
> + }
> + } else if (var == NULL) {
> + var = argv[i];
> + } else {
> + printf("duplicated varname\n");
> + return CMD_RET_USAGE;
> + }
> + }
I'd prefer that to validate the command-line doesn't have multiple
variable names, or the variable name specified before the -bootable
flag, so that only the following options are valid:
... var
... -bootable var
and not:
... var1 var2
... var -bootable
etc.
This could be tightened up later I suppose. Other than that, this series
looks good at a quick glance, so:
Acked-by: Stephen Warren <swarren@nvidia.com>
next prev parent reply other threads:[~2015-02-24 0:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 20:53 [U-Boot] [PATCH 0/3] Boot from the bootable paritions Sjoerd Simons
2015-02-19 20:53 ` [U-Boot] [PATCH 1/3] part: Add support for list filtering on bootable partitions Sjoerd Simons
2015-02-24 0:40 ` Stephen Warren [this message]
2015-02-19 20:53 ` [U-Boot] [PATCH 2/3] config_cmd_default.h: Add 'env exists' command Sjoerd Simons
2015-02-19 20:53 ` [U-Boot] [PATCH 3/3] config_distro_bootcmd.h: Prefer booting from bootable paritions Sjoerd Simons
2015-02-20 7:10 ` [U-Boot] [PATCH 0/3] Boot from the " Hans de Goede
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=54EBC873.7030206@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.