27 uint32_t lba, uint32_t offset, uint32_t len,
29 if (block_size == 0)
return false;
30 if (is_write && (offset != 0 || (len % block_size) != 0))
return false;
31 uint64_t addr = (uint64_t)lba * block_size + offset;
32 if (addr + len > total_bytes)
return false;
static bool usb_msc_range_ok(uint64_t total_bytes, uint16_t block_size, uint32_t lba, uint32_t offset, uint32_t len, bool is_write)
Validates an MSC block access against the volume geometry.