summaryrefslogtreecommitdiffstats
path: root/lib/flash
Commit message (Collapse)AuthorAgeFilesLines
* lib/flash: fix resource leak in flash_setup_buffer() error pathsAndrew Donnellan2016-05-061-5/+8
| | | | | | | | | | | Some error paths in flash_setup_buffer() fail to free the flash_info struct or close the open ffs before they return. Change them to goto the cleanup code at the end. Separate the cleanup code into separate labels depending on whether we need to call ffs_close(), arch_flash_close() and talloc_free(). Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* lib/flash: Fix version side being interpreted backwardsSam Mendoza-Jonas2016-03-051-1/+1
| | | | Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
* lib/flash: Add support for platform versionsSamuel Mendoza-Jonas2016-02-093-0/+255
Add basic libflash support to read the VERSION partition on BMC machines. This adds a dependency on the libflash shared library from Skiboot. The MTD partition is accessed through the libflash helper functions. Once read into a buffer, the VERSION partition is a simple list of newline-terminated version strings. Some BMC platforms may have two 'sides' to flash - these are interpreted as the "current" and "other" sides depending on which one the current Petitboot is running from. Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
OpenPOWER on IntegriCloud