9
0
Fork 0
barebox/arch
Sascha Hauer 5ee4ad2229 environment variables: introduce new helpers
This introduces some new environment variable helpers and updates
the existing ones. Newly introduced are:

getenv_bool: read a bool variable
getenv_ul: read an unsigned long variable
getenev_uint: read an unsigned int variable
getenv_nonempty: like normal getenv, but does return NULL instead of an
                 empty string

All new helpers take a pointer to the value. This value is only modified
when the variable exists. This allows the following programming scheme:

	unsigned int myvalue = sanedefault;

	getenv_uint("myvalue", &myvalue);

So without checking the return value myvalue contains the best possible
value.

getenv_ull is updated to this scheme.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-30 10:28:52 +02:00
..
arm environment variables: introduce new helpers 2013-09-30 10:28:52 +02:00
blackfin Set model and hostname at boardlevel 2013-08-16 08:40:55 +02:00
mips Merge branch 'for-next/omap' 2013-09-05 10:40:04 +02:00
nios2 Set model and hostname at boardlevel 2013-08-16 08:40:55 +02:00
openrisc Set model and hostname at boardlevel 2013-08-16 08:40:55 +02:00
ppc ppc: bootm: relocate fdt to valid boot memory 2013-09-09 17:08:39 +02:00
sandbox Set model and hostname at boardlevel 2013-08-16 08:40:55 +02:00
x86 Set model and hostname at boardlevel 2013-08-16 08:40:55 +02:00
architecture.dox MIPS: add documentation 2011-08-05 18:20:17 +02:00