diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2015-06-04 10:36:03 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-06-09 16:37:33 +1000 |
commit | 89ec9eb94a0bf4605e73bc3dd1d8588005b7ec4d (patch) | |
tree | 6a31ff7ac65f0c252569b5ac2cf2e7c3aca06751 /libflash/libflash.c | |
parent | 39d9e14cdeef9a20e3da05d527b136de65e39904 (diff) | |
download | skiboot-89ec9eb94a0bf4605e73bc3dd1d8588005b7ec4d.zip skiboot-89ec9eb94a0bf4605e73bc3dd1d8588005b7ec4d.tar.gz skiboot-89ec9eb94a0bf4605e73bc3dd1d8588005b7ec4d.tar.bz2 |
libflash: Add checking at blocklevel for erase block aligned erase lengths
Currently blocklevel_erase() will let any erase of any size get passed down
to the backend. Not strictly a problem since libflash does do this check
as well, however, not all future backends will.
This is very much a sanity check to save from a likely mistake.
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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libflash/libflash.c b/libflash/libflash.c index 2af0c79..e7b3c8e 100644 --- a/libflash/libflash.c +++ b/libflash/libflash.c @@ -836,6 +836,7 @@ bail: c->bl.write = &flash_smart_write; c->bl.erase = &flash_erase; c->bl.get_info = &flash_get_info; + c->bl.erase_mask = c->min_erase_mask; *bl = &(c->bl); return 0; |