royzah opened a new pull request, #20405:
URL: https://github.com/apache/nuttx/pull/20405

   ## Why
   
   `MTDIOC_ERASESECTORS` on a partition went straight to the parent with no 
bound, so an erase from the last block on hit the next partition. 
`part_erase()` already checks it.
   
   ## How
   
   Call `part_erase()`. Plus the `nxstyle` fixes in the file.
   
   ## Tested
   
   i.MX93, 64 MB FlexSPI NOR in partitions, `MTDIOC_ERASESECTORS` from the 
block past the end of a 7680-block partition:
   
   | | result |
   | --- | --- |
   | before | erases the next partition's first block (read from the code, not 
run: it holds an image) |
   | after | `-ENXIO` |
   
   ```
   erase block 7680 of a 7680-block partition: -1, errno 6
   ```
   
   `tools/checkpatch.sh` clean.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to