mirror of
https://github.com/apache/nuttx.git
synced 2026-08-02 12:49:00 +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> |
||
|---|---|---|
| .. | ||
| boardctl.h | ||
| custom_file.h | ||
| endian.h | ||
| epoll.h | ||
| eventfd.h | ||
| fcntl.h | ||
| file.h | ||
| gmon.h | ||
| inotify.h | ||
| ioctl.h | ||
| ipc.h | ||
| mman.h | ||
| mount.h | ||
| msg.h | ||
| param.h | ||
| pciio.h | ||
| poll.h | ||
| prctl.h | ||
| queue.h | ||
| random.h | ||
| resource.h | ||
| select.h | ||
| sem.h | ||
| sendfile.h | ||
| shm.h | ||
| signal.h | ||
| signalfd.h | ||
| socket.h | ||
| sockio.h | ||
| stat.h | ||
| statfs.h | ||
| statvfs.h | ||
| syscall.h | ||
| syscall_lookup.h | ||
| sysinfo.h | ||
| sysmacros.h | ||
| time.h | ||
| timerfd.h | ||
| times.h | ||
| timex.h | ||
| tree.h | ||
| types.h | ||
| uio.h | ||
| un.h | ||
| utsname.h | ||
| vfs.h | ||
| video_controls.h | ||
| videoio.h | ||
| wait.h | ||