michallenc opened a new issue, #16074:
URL: https://github.com/apache/nuttx/issues/16074

   ### Description / Steps to reproduce the issue
   
   Flash partition configured as BCH layer (device driver created with 
`bchdev_register`) doesn't allow `stat` call to obtain the information about an 
underlying MTD device/flash. This is caused by `INODE_IS_MTD` not being set and 
thus
   function `inode_stat` falls to the last `else` statement and does not fill 
the necessary information.
   
   This is a logical output as BCH layer is registered as a standard character 
device driver, therefore it is not considered as MTD but as a standard driver 
(ADC, PWM, etc.). This, however, makes the `stat` call unusable for it.
   
   We should probably find a way how to pass an information there is a MTD 
device under the driver and that we should access it with a standard 
`MTDIOC_GEOMETRY` ioctl to obtain the required information and pass them to the 
user.
   
   ### On which OS does this issue occur?
   
   [OS: Linux]
   
   ### What is the version of your OS?
   
   Ubuntu 22.04.5 LTS
   
   ### NuttX Version
   
   master
   
   ### Issue Architecture
   
   [Arch: all]
   
   ### Issue Area
   
   [Area: Kernel], [Area: Drivers]
   
   ### Host information
   
   _No response_
   
   ### Verification
   
   - [x] I have verified before submitting the report.


-- 
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