mirror of
https://github.com/apache/nuttx.git
synced 2026-08-12 07:55:32 +00:00
blksize_t is currently defined as int16_t, which overflows when a filesystem reports a block size larger than 32767 bytes. This causes st_blksize to become zero, leading to an integer divide-by-zero when st_blocks is calculated in stat(). Widen blksize_t to int32_t to support larger filesystem block sizes. Update nuttx_blksize_t in include/nuttx/fs/hostfs.h to keep it consistent with include/sys/types.h. struct geometry.geo_sectorsize (include/nuttx/fs/ioctl.h) is also typed blksize_t, so every debug print of that field using a 16-bit format specifier is updated to PRId32 to match the new width: drivers/misc/ramdisk.c, drivers/mmcsd/mmcsd_spi.c, drivers/mtd/ftl.c, fs/driver/fs_blockmerge.c, drivers/mtd/smart.c, drivers/usbhost/usbhost_storage.c, drivers/mmcsd/mmcsd_sdio.c, arch/arm/src/s32k1xx/s32k1xx_eeeprom.c, arch/arm/src/lc823450/lc823450_mmcl.c. Signed-off-by: Ansh Rai <anshrai331@gmail.com> Signed-off-by: root <root@LAPTOP-9C7LKDC5.localdomain> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| at24xx.c | ||
| at25.c | ||
| at25ee.c | ||
| at45db.c | ||
| cfi.c | ||
| cfi.h | ||
| CMakeLists.txt | ||
| dhara.c | ||
| filemtd.c | ||
| ftl.c | ||
| gd5f.c | ||
| gd25.c | ||
| gd55.c | ||
| hamming.c | ||
| is25xp.c | ||
| Kconfig | ||
| m25px.c | ||
| Make.defs | ||
| mtd_cfi.c | ||
| mtd_config.c | ||
| mtd_config_nvs.c | ||
| mtd_modeltab.c | ||
| mtd_nand.c | ||
| mtd_nandecc.c | ||
| mtd_nandmodel.c | ||
| mtd_nandram.c | ||
| mtd_nandscheme.c | ||
| mtd_nandwrapper.c | ||
| mtd_onfi.c | ||
| mtd_partition.c | ||
| mtd_progmem.c | ||
| mtd_rwbuffer.c | ||
| mx25lx.c | ||
| mx25rxx.c | ||
| mx35.c | ||
| n25qxxx.c | ||
| nullmtd.c | ||
| nvblk.c | ||
| rammtd.c | ||
| ramtron.c | ||
| rpmsgmtd.c | ||
| rpmsgmtd.h | ||
| rpmsgmtd_server.c | ||
| s25fl1.c | ||
| sector512.c | ||
| skeleton.c | ||
| smart.c | ||
| sst25.c | ||
| sst25xx.c | ||
| sst26.c | ||
| sst39vf.c | ||
| w25.c | ||
| w25n.c | ||
| w25qxxxjv.c | ||