libflashrom is a shared library which can be used to write programs which need to detect/read/write/erase flash ROM chips using various programmers.
It is, among other things, useful so that different frontends can be written (a command-line tool, various GUIs, libpayload integration, others).
Work in progress.
$ make libflashrom.a
This is a random list of TODO items which need to be fixed in order to make a usable and useful libflashrom.
- There should be one single flashrom.h or libflashrom.h include file, which contains (only!) the function prototypes and macros which belong to the public libflashrom API.
- All functions and macros of the public API should have a prefix in order to not pollute the namespace of the programs that link against libflashrom.
- Suggestion: fl_ and FL_. Examples: fl_init() or FL_ERR_MALLOC.
- No function in libflashrom is allowed to call exit().
- All public API functions should return meaningful and unique error codes (which should have useful macros/names such as FL_OK, FL_ERR_MALLOC, etc.).
- pkg-config support would be nice, i.e., some simple libflashrom.pc file.