nuttx/drivers/usbhost
Ansh Rai 54b0066a69 libs/libc: Fix divide-by-zero in stat() with large filesystem block sizes
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>
2026-07-16 23:37:22 +08:00
..
CMakeLists.txt drivers/usbhost/usbhost_cdcecm.c: Added support for Host CDC-ECM 2026-05-06 06:20:03 +08:00
hid_parser.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
Kconfig drivers/usbhost/usbhost_cdcecm.c: Added support for Host CDC-ECM 2026-05-06 06:20:03 +08:00
Make.defs drivers/usbhost/usbhost_cdcecm.c: Added support for Host CDC-ECM 2026-05-06 06:20:03 +08:00
usbhost_bthci.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_cdcacm.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_cdcecm.c drivers/usbhost/usbhost_cdcecm.c: Converted CDC-ECM to lower half 2026-05-06 06:20:03 +08:00
usbhost_cdcmbim.c drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
usbhost_composite.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_composite.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
usbhost_devaddr.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_drivers.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_enumerate.c drivers/usbhost/usbhost_enumerate.c: Allow selecting USB configuration 2026-05-06 06:20:03 +08:00
usbhost_findclass.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_ft232r.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_hidkbd.c drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
usbhost_hidmouse.c drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
usbhost_hub.c arch/arm/src/stm32h5/stm32_usbdrdhost.c: Fixed Hub support 2026-04-19 14:24:40 +08:00
usbhost_max3421e.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_registerclass.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_registry.c drivers/usbhost: Use small lock to protect usbhost common function 2025-12-13 12:39:48 +08:00
usbhost_registry.h drivers/usbhost: Use small lock to protect usbhost common function 2025-12-13 12:39:48 +08:00
usbhost_skeleton.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_storage.c libs/libc: Fix divide-by-zero in stat() with large filesystem block sizes 2026-07-16 23:37:22 +08:00
usbhost_trace.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_waiter.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_xboxcontroller.c drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-07-15 15:27:28 +08:00
usbhost_xhci.h drivers/usbhost: add xHCI support 2025-05-15 21:58:57 +08:00
usbhost_xhci_pci.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
usbhost_xhci_trace.c drivers/usbhost: add xHCI support 2025-05-15 21:58:57 +08:00
usbhost_xhci_trace.h drivers/usbhost: add xHCI support 2025-05-15 21:58:57 +08:00