You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e337f31
Browse filesBrowse the repository at this point in the historyBrowse files
fs/partition: gate on BLOCK_PARTITION / MTD_PARTITION not mountpoint
Build the partition table support whenever block or MTD partitions are
available (CONFIG_BLOCK_PARTITION || CONFIG_MTD_PARTITION) instead of
gating the whole directory on !CONFIG_DISABLE_MOUNTPOINT. This lets the
partition parser be built for raw block/MTD partition access without
pulling in mountpoint support, and dropped entirely when neither kind of
partition is configured.
The Make.defs/CMakeLists.txt directory guard and the Kconfig menu guard
switch to the BLOCK_PARTITION || MTD_PARTITION condition, and
fs/Makefile includes fs/partition outside the mount point block, as
CMake already does. Inside
fs_partition.c the block path (parse_block_partition, the block branch
of read_partition_block, and the register_partition_with_inode call) is
gated by CONFIG_BLOCK_PARTITION, and the MTD path by
CONFIG_MTD_PARTITION. In <nuttx/fs/partition.h> struct partition_s
stays visible, since boards use it for static partition tables, and
parse_block_partition() / parse_mtd_partition() are declared under
their own option.
[skip-cmake-parity]: CMake needs no change, since fs/CMakeLists.txt
already adds every subdirectory and fs/partition/CMakeLists.txt gates
itself.
Also tighten two consistency points:
- The register_partition_with_mtd prototype guard is narrowed from
CONFIG_MTD to CONFIG_MTD_PARTITION so declaration, definition
(fs_mtdpartition.c) and call site all agree.
- fs_partition.c includes <errno.h> explicitly, since
read_partition_block now returns -ENODEV when the state holds
neither a block nor an MTD device.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
Signed-off-by: jingfei <jingfei@xiaomi.com>
0 commit comments