| 33f0086c | 05-Apr-2017 |
Stefano Babic <sbabic@denx.de> |
env: fix memory leak in fw_env routines
fw_env_open allocates buffers to store the environment, but these buffers are never freed. This becomes quite nasty using the fw_ tools as library, because ea
env: fix memory leak in fw_env routines
fw_env_open allocates buffers to store the environment, but these buffers are never freed. This becomes quite nasty using the fw_ tools as library, because each access to the environment (even just reading a variable) generates a memory leak equal to the size of the environment.
Fix this renaming fw_env_close() as fw_env_flush(), because the function really flushes the environment from RAM to storage, and add a fw_env_close function to free the allocated resources.
Signed-off-by: Stefano Babic <sbabic@denx.de>
show more ...
|
| 00c234f3 | 05-Apr-2017 |
Stefano Babic <sbabic@denx.de> |
env: add a version number to check API
Changes in the environment library are difficult to tracked by programs using the library. Add simply an API version number that must be increased each time wh
env: add a version number to check API
Changes in the environment library are difficult to tracked by programs using the library. Add simply an API version number that must be increased each time when the API is changed.
This can be detected and a program can work with different versions of the library.
Signed-off-by: Stefano Babic <sbabic@denx.de>
show more ...
|
| 24307d63 | 29-Aug-2016 |
Andreas Fenkart <andreas.fenkart@digitalstrom.com> |
Suspected Spam: Do not open attachements![PATCH 4/6] tools/env: flash_write_buf: enforce offset to be start of environment
This allows to take advantage of the environment being block aligned. This
Suspected Spam: Do not open attachements![PATCH 4/6] tools/env: flash_write_buf: enforce offset to be start of environment
This allows to take advantage of the environment being block aligned. This is not a new constraint. Writes always start at the begin of the environment, since the header with CRC/length as there. Every environment modification requires updating the header
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
show more ...
|
| ff95e579 | 29-Aug-2016 |
Andreas Fenkart <andreas.fenkart@digitalstrom.com> |
tools/env: lookup dev_type directly from flash_read_buf/flash_write_buf
flash_write_buf already looks up size/offset/#sector from struct envdev_s. It can look up mtd_type as well. Same applies to fl
tools/env: lookup dev_type directly from flash_read_buf/flash_write_buf
flash_write_buf already looks up size/offset/#sector from struct envdev_s. It can look up mtd_type as well. Same applies to flash_read_buf. Makes the interface simpler
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
show more ...
|
| c6012bbc | 29-Aug-2016 |
Andreas Fenkart <andreas.fenkart@digitalstrom.com> |
tools/env: pass bad block offset by value
the offset is not modified by linux ioctl call see mtd_ioctl{drivers/mtd/mtdchar.c} Makes the interface less ambiguous, since the caller can now exclude a m
tools/env: pass bad block offset by value
the offset is not modified by linux ioctl call see mtd_ioctl{drivers/mtd/mtdchar.c} Makes the interface less ambiguous, since the caller can now exclude a modification of blockstart
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
show more ...
|
| 4ed6f431 | 17-Aug-2016 |
Andreas Fenkart <andreas.fenkart@digitalstrom.com> |
tools/env: soften warning about erase block alignment
addon 183923d3e MMC/SATA have no erase blocks, only blocks. Hence the warning about erase block alignment might be confusing in such environment
tools/env: soften warning about erase block alignment
addon 183923d3e MMC/SATA have no erase blocks, only blocks. Hence the warning about erase block alignment might be confusing in such environment.
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|