diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2016-01-04 13:23:07 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-01-15 15:04:57 +1100 |
commit | 6b53f9241cf4d044d0f0f756f4a8c9f4c55f0140 (patch) | |
tree | db7699c82d90abd49867f462c3dd306449b46298 /libflash/libflash.c | |
parent | b25529d182b53be0b760638c812c422b794546e4 (diff) | |
download | skiboot-6b53f9241cf4d044d0f0f756f4a8c9f4c55f0140.zip skiboot-6b53f9241cf4d044d0f0f756f4a8c9f4c55f0140.tar.gz skiboot-6b53f9241cf4d044d0f0f756f4a8c9f4c55f0140.tar.bz2 |
libflash/blocklevel: Add keep_alive parameter
Currently the file backend will keep a file descriptor open until the
structure is destroyed. This is undesirable for daemons and long running
processes that only have a very occasional need to access the file. Keeping
the file open requires users of blocklevel to close and reinit their
structures every time, doing is isn't disastrous but can easily be
managed at the interface level.
This has been done at the blocklevel_device interface so as to provide
minimal changes to arch_flash_init().
At the moment there isn't a need for the actually flash driver to be able
to do this, this remains unimplmented there.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libflash/libflash.c')
-rw-r--r-- | libflash/libflash.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libflash/libflash.c b/libflash/libflash.c index 69e809e..50dc54d 100644 --- a/libflash/libflash.c +++ b/libflash/libflash.c @@ -835,6 +835,10 @@ bail: return rc; } + /* The flash backend doesn't support reiniting it */ + c->bl.keep_alive = true; + c->bl.reacquire = NULL; + c->bl.release = NULL; c->bl.read = &flash_read; c->bl.write = &flash_smart_write; c->bl.erase = &flash_erase; |