allow buflib_free to check for invalid or already freed handles
within the function -- remove all the invalid handle guards thru core_free
Change-Id: Ibdcbc82760fc93b674c42283fca420d94907df8e
There are various allocations that can't be moved or shrunk.
Provide a global callback struct for this use case instead of
making each caller declare its own dummy struct.
Also fixed ROLO and x1000 installer code which incorrectly
used movable allocations.
Change-Id: I00088396b9826e02e69a4a33477fe1a7816374f1
This overflow is impossible to trigger due to the simple
relationship between binary and hexadecimal numbers.
Change-Id: Ie8243129967abb935a77152a808765318052c979
Instead of using isgraph(), check for legal FAT32 characters
excluding spaces (which are used as field separators).
Change-Id: I291f0acb5f24c558099c237d913f4f35ae06b834
- Only treat EOF as newline if the line is non-empty to
suppress a useless empty line after the end of a file.
- Deal with 0- and 1-byte line buffers safely.
- Remove whitespace stripping and comment handling which
was left over from refactoring. Move it to xf_map_parse()
where it belongs.
Change-Id: I9f05f4e18ca6dd011ca4cd231f0b5ea37c784778
Pass COVERAGE=1 to enable clang-based code coverage and pass
SANITIZE=1 to enable sanitizers. 'make cov' will run the test
app and show a coverage summary.
Change-Id: I8a33e8b78665165d8da1818dc01f495f0c52cf06
This is a new flash installer framework for the X1000 targets.
A bunch of this code is *UNTESTED* but there is an external test
harness which allows the library to be built and tested on a PC.
Once tests are written and the bugs are ironed out this framework
will replace the existing installer code.
New features:
- Update tarballs are MD5-checksummed to guarantee integrity.
- The flash map is no longer fixed -- updates are self describing and
carry a map file which specifies the areas to update.
- Can take full or partial backups with checksums computed on the fly.
- Supports an additional verification mode which reads back data after
writing to ensure the flash contents were not silently corrupted.
Change-Id: I29a89190c7ff566019f6a844ad0571f01fb7192f