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

   ## Summary
   
   `mount()` and `open_blockdriver()` auto-create FTL block devices for MTD
   partitions through `mtd_proxy()`. This always pulls in `fs_mtdproxy.c` when
   `CONFIG_MTD` is enabled, even when the block device is created manually.
   
   Add `CONFIG_FS_MTD_PROXY` (default `y` for backward compatibility) to gate
   this auto-conversion. When it is disabled, `fs_mtdproxy.c` is not built and
   MTD devices must be registered as block devices explicitly if needed.
   
   ## Impact
   
   - New feature: YES, new option `CONFIG_FS_MTD_PROXY`, default `y`.
   - User adaptation: NO, existing configurations keep the current behavior.
   - Build: YES, `fs_mtdproxy.c` is built only with `CONFIG_FS_MTD_PROXY`.
   - Hardware: NO.
   - Documentation: NO.
   - Security: NO.
   - Compatibility: NO change with the default value.
   
   ## Testing
   
   I confirm that changes are verified on local setup and works as intended:
   
   - Build Host: Ubuntu 22.04 x86_64, gcc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0,
     master `a3b67d70e0`.
   - Target: `sim:nsh` with `CONFIG_MTD` and `CONFIG_RAMMTD`. Verified on sim
     only, no real hardware.
   - `./tools/checkpatch.sh -m -g master..HEAD`: all checks pass.
   - With `CONFIG_FS_MTD_PROXY=y` (default): Make and CMake builds pass,
     `ostest` exits with status 0.
   - With `CONFIG_FS_MTD_PROXY` disabled: Make build passes.
   
   ## PR verification Self-Check
   
   * [x] This PR introduces only one functional change.
   * [x] I have updated all required description fields above.
   * [x] My PR adheres to Contributing Guidelines and Documentation (git commit 
title and message, coding standard, etc).
   * [ ] My PR is still work in progress (not ready for review).
   * [x] My PR is ready for review and can be safely merged into a codebase.
   


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