]> git.sur5r.net Git - u-boot/commit
tools/env: reuse fw_getenv in fw_printenv function
authorAndreas Fenkart <andreas.fenkart@digitalstrom.com>
Sat, 16 Jul 2016 15:06:15 +0000 (17:06 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 22 Jul 2016 18:46:22 +0000 (14:46 -0400)
commitc5c41c45b1025aa951c794bb8add9c7c806496ee
tree2a68575edcc252e007e43c182d93322526c384de
parent1b7427cd2ab6aae150559ee2edc8965fda113fdf
tools/env: reuse fw_getenv in fw_printenv function

Try to avoid adhoc iteration of the environment. Reuse fw_getenv
to find the variables that should be printed. Only use open-coded
iteration when printing all variables.
For backwards compatibility, keep emitting a newline when
printing with value_only.

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
tools/env/fw_env.c