public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/7] tools: env: simplify argument parsing
@ 2015-11-26 10:52 Andreas Fenkart
  2015-11-26 10:52 ` [U-Boot] [PATCH v2 1/7] tools: env validate: pass values as 0-based array Andreas Fenkart
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Andreas Fenkart @ 2015-11-26 10:52 UTC (permalink / raw)
  To: u-boot

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.

v2:
- rebased on top of current master

Andreas Fenkart (7):
  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
  tools: env: factor out parse_common_args
  tools: env: update usage strings

 common/env_flags.c      |  14 +--
 include/env_flags.h     |   2 +-
 tools/env/fw_env.c      | 127 ++++++------------------
 tools/env/fw_env.h      |  22 +++++
 tools/env/fw_env_main.c | 250 ++++++++++++++++++++++++++++++++++--------------
 5 files changed, 238 insertions(+), 177 deletions(-)

-- 
2.6.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-11-26 10:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26 10:52 [U-Boot] [PATCH v2 0/7] tools: env: simplify argument parsing Andreas Fenkart
2015-11-26 10:52 ` [U-Boot] [PATCH v2 1/7] tools: env validate: pass values as 0-based array Andreas Fenkart
2015-11-26 10:52 ` [U-Boot] [PATCH v2 2/7] tools: env: make parse_aes_key stateless Andreas Fenkart
2015-11-26 10:52 ` [U-Boot] [PATCH v2 3/7] tools: env: introduce setenv/printenv argument structs Andreas Fenkart
2015-11-26 10:52 ` [U-Boot] [PATCH v2 4/7] tools: env: parse aes key / suppress flag into argument struct Andreas Fenkart
2015-11-26 10:52 ` [U-Boot] [PATCH v2 5/7] tools: env: shift optind arguments and fix argument indices Andreas Fenkart
2015-11-26 10:52 ` [U-Boot] [PATCH v2 6/7] tools: env: factor out parse_common_args Andreas Fenkart
2015-11-26 10:52 ` [U-Boot] [PATCH v2 7/7] tools: env: update usage strings Andreas Fenkart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox