[Skiboot] [RFC PATCH 0/2] Add libflash backend to use files

Cyril Bur cyril.bur at au1.ibm.com
Thu Mar 19 18:18:19 AEDT 2015

The libflash/libffs APIs to access flash are useful however (from userland in
particular) the actual flash may not be availible. Using the APIs even when
the data is only availible through a file descriptor would be really useful.

This patch adds a libflash backend which takes a file descriptor and allows
libflash to use its calls onto the file descriptor.

For now I only see the upcoming 'gard tool' using this, the tool to read the
GUARD partition out of the flash and present it to the user but perhaps other
tools will benifit from because able to read flash that is actually a file.

Cyril Bur (2):
  libflash: don't use the low level interface if it doesn't exist
  libflash/file: add file abstraction for libflash

 libflash/file_flash.c    | 224 +++++++++++++++++++++++++++++++++++++++++++++++
 libflash/file_flash.h    |  11 +++
 libflash/libflash-priv.h |   2 +
 libflash/libflash.c      |  11 ++-
 4 files changed, 247 insertions(+), 1 deletion(-)
 create mode 100644 libflash/file_flash.c
 create mode 100644 libflash/file_flash.h


More information about the Skiboot mailing list