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> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| hid_parser.c | ||
| Kconfig | ||
| Make.defs | ||
| usbhost_bthci.c | ||
| usbhost_cdcacm.c | ||
| usbhost_cdcecm.c | ||
| usbhost_cdcmbim.c | ||
| usbhost_composite.c | ||
| usbhost_composite.h | ||
| usbhost_devaddr.c | ||
| usbhost_drivers.c | ||
| usbhost_enumerate.c | ||
| usbhost_findclass.c | ||
| usbhost_ft232r.c | ||
| usbhost_hidkbd.c | ||
| usbhost_hidmouse.c | ||
| usbhost_hub.c | ||
| usbhost_max3421e.c | ||
| usbhost_registerclass.c | ||
| usbhost_registry.c | ||
| usbhost_registry.h | ||
| usbhost_skeleton.c | ||
| usbhost_storage.c | ||
| usbhost_trace.c | ||
| usbhost_waiter.c | ||
| usbhost_xboxcontroller.c | ||
| usbhost_xhci.h | ||
| usbhost_xhci_pci.c | ||
| usbhost_xhci_trace.c | ||
| usbhost_xhci_trace.h | ||