All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Heimpold <mhei@heimpold.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/5] tools: env: simplify argument parsing
Date: Tue, 24 Nov 2015 20:26:35 +0100	[thread overview]
Message-ID: <10422451.SNlxWfdyyk@kerker> (raw)
In-Reply-To: <1448371275-900-1-git-send-email-andreas.fenkart@dev.digitalstrom.org>

Hi Andreas,

Am Tuesday 24 November 2015, 14:21:10 schrieb Andreas Fenkart:
> I want to add -c config_file parameter to fw_setenv/fw_printenv,
> so I can switch between old/new u-boot environment after u-boot
> upgrade.

for a similar use-case a patch was accepted/merged some days ago:
http://git.denx.de/?p=u-boot.git;a=commit;h=9884f44cab5d1ce944b1dc087c9bb8db0efb5160

This is why you series does not apply to current master branch.

> In it's current state paramter parsing is quite hard to
> understand since it happens in two places. One is using getopt
> at the beginning of main, the second is using adhoc parsing
> where the order of arguments is important.
> This patch will parse arguments only in one place using getopt
> and store the parsed flags in a global struct.

It would be desirable, if you could rebase and respin your series,
since it is much appreciated.

Best regards,
Michael

> 
> Andreas Fenkart (5):
>   tools: env validate: pass values as 0-based array
>   tools: env: make parse_aes_key stateless
>   tools: env: introduce setenv/printenv argument structs
>   tools: env: parse aes key / suppress flag into argument struct
>   tools: env: shift optind arguments and fix argument indices
> 
>  common/env_flags.c      |  14 +++---
>  include/env_flags.h     |   2 +-
>  tools/env/fw_env.c      |  94 ++++++++++--------------------------
>  tools/env/fw_env.h      |  21 ++++++++
>  tools/env/fw_env_main.c | 124 +++++++++++++++++++++++++++++++++---------------
> 5 files changed, 140 insertions(+), 115 deletions(-)

      parent reply	other threads:[~2015-11-24 19:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 13:21 [U-Boot] [PATCH 0/5] tools: env: simplify argument parsing Andreas Fenkart
2015-11-24 13:21 ` [U-Boot] [PATCH 1/5] tools: env validate: pass values as 0-based array Andreas Fenkart
2015-11-24 13:21 ` [U-Boot] [PATCH 2/5] tools: env: make parse_aes_key stateless Andreas Fenkart
2015-11-24 13:21 ` [U-Boot] [PATCH 3/5] tools: env: introduce setenv/printenv argument structs Andreas Fenkart
2015-11-24 13:21 ` [U-Boot] [PATCH 4/5] tools: env: parse aes key / suppress flag into argument struct Andreas Fenkart
2015-11-24 13:21 ` [U-Boot] [PATCH 5/5] tools: env: shift optind arguments and fix argument indices Andreas Fenkart
2015-11-24 19:26 ` Michael Heimpold [this message]

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=10422451.SNlxWfdyyk@kerker \
    --to=mhei@heimpold.de \
    --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.