tools/env: Add environment variable flags support
authorJoe Hershberger <joe.hershberger@ni.com>
Wed, 12 Dec 2012 04:16:32 +0000 (22:16 -0600)
committerTom Rini <trini@ti.com>
Thu, 13 Dec 2012 18:46:56 +0000 (11:46 -0700)
commit30fd4fadb319d7c6d43d949e2d30ffaea46a60cf
treecedfa8c38a45f3f6afe046a999003e56a609c84d
parent2598090b7e17f8bdca95b22e7f27217054730e02
tools/env: Add environment variable flags support

Currently just validates variable types as decimal, hexidecimal,
boolean, ip address, and mac address.  Call
env_acl_validate_setenv_params() from setenv() in fw_env.c.

If the entry is not found in the env .flags, then look in the static
one. This allows the env to override the static definitions, but prevents
the need to have every definition in the environment distracting you.

Need to build in _ctype for isdigit for Linux.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
common/env_attr.c
common/env_flags.c
include/env_flags.h
tools/env/Makefile
tools/env/fw_env.c