summaryrefslogtreecommitdiffstats
path: root/include/environment.h
Commit message (Collapse)AuthorAgeFilesLines
* include/environment.h: Add missing includeSascha Hauer2014-10-221-0/+1
| | | | | | include/environment.h uses error codes, so it needs errno.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment variables: introduce new helpersSascha Hauer2013-09-301-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* treewide include/: Add missing includesSascha Hauer2013-05-311-0/+2
| | | | | | | This adds several missing includes to files under include/ which we relied on being included implicitly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: remove now unnecessary includeSascha Hauer2013-01-201-4/+0
| | | | | | | include/environment.h is no longer necessary to build scripts/bareboxenv, so remove its inclusion. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move prototypes for envfs_* to envfs.hSascha Hauer2013-01-201-7/+0
| | | | | | | environment.h is for environment variables, not for the environment storage (envfs), so move the prototypes to envfs.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* make file_*_action staticSascha Hauer2013-01-201-4/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move struct action_data to the only file using itSascha Hauer2013-01-201-8/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* loadenv: allow more fine grained environment loadingSascha Hauer2012-11-291-3/+4
| | | | | | | | | | | This implements two new options for the loadenv command: -s: removes (scrubs) old directory contents to be able to create a fresh environment from for example /dev/defaultenv -n: no overwrite. Do not overwrite existing files. This allows to keep parts of the old environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2012-11-161-5/+6
|\ | | | | | | | | | | | | Conflicts: commands/Makefile Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * environment variables: use linux listSascha Hauer2012-10-301-5/+6
| | | | | | | | | | | | | | | | This switches environment variables to use linux list. This is easier to read. An additional plus is that the environment variables no longer need an initcall, so malloc is the only requirement for them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | provide static inline function for exportSascha Hauer2012-10-041-0/+6
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-4/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: export_/getenv_ull as inline ifndef CONFIG_ENVIRONMENT_VARIABLESJean-Christophe PLAGNIOL-VILLARD2012-01-111-3/+7
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce some env helpersSascha Hauer2011-11-291-0/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: make default env path configurableSascha Hauer2011-04-121-0/+3
| | | | | | | | Normally the default path to save the environment is /dev/env0. However, we can't map a file in a fat filesystem to /dev/env0. So if we want to store the environment in a file in fat we have to make it configurable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* env: Make environment variable support optionalSascha Hauer2011-04-111-0/+12
| | | | | | | Environment variables are only useful in interactive environments. Make it optional on our way to support a noninteractive barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename U-Boot-v2 project to bareboxSascha Hauer2009-12-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This has been done with the following script: find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \ -e 's/u2boot/barebox/g' \ -e 's/U2Boot/barebox/g' \ -e 's/U-boot V2/barebox/g' \ -e 's/u-boot v2/barebox/g' \ -e 's/U-Boot V2/barebox/g' \ -e 's/U-Boot-v2/barebox/g' \ -e 's/U_BOOT/BAREBOX/g' \ -e 's/UBOOT/BAREBOX/g' \ -e 's/uboot/barebox/g' \ -e 's/u-boot/barebox/g' \ -e 's/u_boot/barebox/g' \ -e 's/U-Boot/barebox/g' \ -e 's/U-boot/barebox/g' \ -e 's/U-BOOT/barebox/g' find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \ xargs -0 -r rename 's/u[-_]?boot/barebox/' It needs some manual fixup following in the next patch Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* separating environment commands, part 2Juergen Beisert2007-11-121-1/+21
| | | | Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
* separating environment commands, part 1Juergen Beisert2007-11-121-0/+23
| | | | Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
* introduce local and global variables, add export commandSascha Hauer2007-09-231-0/+3
|
* remove old functions from include/environment.hSascha Hauer2007-09-131-19/+5
|
* svn_rev_481Sascha Hauer2007-07-051-1/+1
| | | | make more char * const, fix compiler warnings
* svn_rev_401Sascha Hauer2007-07-051-1/+1
|
* svn_rev_321Sascha Hauer2007-07-051-0/+5
| | | | move some functions away from common.h
* svn_rev_146Sascha Hauer2007-07-051-64/+2
| | | | remove #ifdef CFG_ENV_* chaos
* [PATCH] Select NAND embedded environment from board configurationStefan Roese2006-11-271-2/+1
| | | | | | | | | | The current NAND Bootloader setup forces the environment variables to be in line with the bootloader. This change enables the configuration to be made in the board include file instead so that it can be individually enabled. Signed-off-by: Nick Spence <nick.spence@freescale.com> Signed-off-by: Stefan Roese <sr@denx.de>
* Add NAND environment support for PPC440EPx Sequoia NAND boot configStefan Roese2006-09-121-0/+4
| | | | Patch by Stefan Roese, 12 Sep 2006
* Support for redundant environment in NAND Flash.Markus Klotzbuecher2006-03-201-0/+12
|
* Fix problem with default #defineswdenk2003-03-061-2/+9
| | | | Cleanup compiler warning
* Initial revisionwdenk2002-11-031-0/+83