Am 03.09.2025 um 09:57 hat Clément Chigot geschrieben:
> This makes those 0x200 far clearer.
>
> Signed-off-by: Clément Chigot <[email protected]>
> ---
> block/vvfat.c | 60 ++++++++++++++++++++++++++++-----------------------
> 1 file changed, 33 insertions(+), 27 deletions(-)
> @@ -1513,7 +1515,7 @@ vvfat_read(BlockDriverState *bs, int64_t sector_num,
> uint8_t *buf, int nb_sector
> " allocated\n", sector_num,
> n >> BDRV_SECTOR_BITS));
> if (bdrv_co_pread(s->qcow, sector_num * BDRV_SECTOR_SIZE, n,
> - buf + i * 0x200, 0) < 0) {
> + buf + i * SECTOR_SIZE, 0) < 0) {
We get a nasty mix of BDRV_SECTOR_SIZE (the QEMU block layer's sector
size) and the new SECTOR_SIZE (the FAT file system's sector size) here.
I think both of these actually refer to FAT.
Should we also change those instances of BDRV_SECTOR_SIZE that really
should be SECTOR_SIZE?
Kevin