mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +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> |
||
|---|---|---|
| .. | ||
| addrenv.c | ||
| CMakeLists.txt | ||
| dev_ascii.c | ||
| dev_mem.c | ||
| dev_null.c | ||
| dev_zero.c | ||
| goldfish_pipe.c | ||
| Kconfig | ||
| lwl_console.c | ||
| Make.defs | ||
| mkrd.c | ||
| optee.c | ||
| optee.h | ||
| optee_msg.h | ||
| optee_rpc.c | ||
| optee_rpc.h | ||
| optee_smc.c | ||
| optee_smc.h | ||
| optee_socket.c | ||
| optee_supplicant.c | ||
| optee_supplicant.h | ||
| ramdisk.c | ||
| rpmsgblk.c | ||
| rpmsgblk.h | ||
| rpmsgblk_server.c | ||
| rpmsgdev.c | ||
| rpmsgdev.h | ||
| rpmsgdev_server.c | ||
| rwbuffer.c | ||