flash_{un,}lock upgrades
Status from this message: Pushed to mtd-utils.git
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | flash_{un, }lock: nest optional parameters in help messageflash_unlock.c | +1 | 0 replies | |
| 2/11 | flash_{un,}lock: switch to getopt libraryflash_unlock.c | +24 | 0 replies | |
| 3/11 | flash_{un,}lock: support --version flagflash_unlock.c | +4 | 0 replies | |
| 4/11 | flash_{un,}lock: document option flagsflash_unlock.c | +6 | 0 replies | |
| 5/11 | flash_{un, }lock: abstract the argument positionsflash_unlock.c | +29 | 0 replies | |
| 6/11 | flash_{un, }lock: move args processing to its own functionflash_unlock.c | +15 | 0 replies | |
| 7/11 | flash_{un, }lock: support both lock/unlock in the same binaryflash_unlock.c | +48 | 0 replies | |
| 8/11 | flash_{un,}lock: add MEMISLOCKED supportflash_unlock.c | +26 | 0 replies | |
| 9/11 | flash_{un, }lock: improve strtol() error handlingflash_unlock.c | +13 | 0 replies | |
| 10/11 | flash_{un,}lock: don't allow "last byte + 1"flash_unlock.c | +1 | 0 replies | |
| 11/11 | flash_{un,}lock: document block count == -1flash_unlock.c | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH mtd-utils 00/11] flash_{un,}lock upgrades
Hi,
I've done a bit of work to make the flash_lock tool more useful, in order to help test some new SPI NOR block protection features. Of note:
* added getopt support
* further unified flash_unlock and flash_lock -- the only difference now is their default feature, and both binaries contain support for all features
* add support for MEMISLOCKED, so we can query arbitrary regions for protection status
* mtdinfo -M already can dump some block lock information, but you get a little more flexibility using flash_lock --info, so both seem worth having IMO
Unsolved issues:
* the MEM{LOCK,UNLOCK,ISLOCKED} ioctls all still use the out-dated 32-bit erase_info_user struct, which means they'll have problems supporting >=4GB flash. This isn't a mtd-utils problem, per se, and at the moment, Linux NAND (the only (?) candidate for >=4GB flash) support doesn't implement any of the locking APIs. But just an observation I ran across.
* Deprecation plan: it would make sense to deprecate and remove flash_unlock eventually (in favor of 'flash_lock --unlock'), but this isn't really pressing, so I don't see a good reason to spend much effort on it.
Enjoy,
Brian
Brian Norris (11):
flash_{un,}lock: nest optional parameters in help message flash_{un,}lock: switch to getopt library flash_{un,}lock: support --version flag flash_{un,}lock: document option flags flash_{un,}lock: abstract the argument positions flash_{un,}lock: move args processing to its own function flash_{un,}lock: support both lock/unlock in the same binary flash_{un,}lock: add MEMISLOCKED support flash_{un,}lock: improve strtol() error handling flash_{un,}lock: don't allow "last byte + 1" flash_{un,}lock: document block count == -1
flash_unlock.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 156 insertions(+), 26 deletions(-)
Signature · 1 line
2.5.0.457.gab17608