[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-5.2 2/7] hw/block/fdc: Let sector offset be unsigned
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-5.2 2/7] hw/block/fdc: Let sector offset be unsigned |
Date: |
Thu, 6 Aug 2020 10:08:19 +0200 |
Sector offset can not be negative, make it unsigned.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/block/fdc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index 2cec7568c1..c91ed7ee2d 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -259,7 +259,7 @@ static uint32_t fd_sector(FDrive *drv)
}
/* Returns current position, in bytes, for given drive */
-static int fd_offset(FDrive *drv)
+static uint64_t fd_offset(FDrive *drv)
{
g_assert(fd_sector(drv) < INT_MAX >> BDRV_SECTOR_BITS);
return fd_sector(drv) << BDRV_SECTOR_BITS;
--
2.21.3
- [PATCH-for-5.2 0/7] hw/block/fdc: Cleanups trying to make sense of the floppy controllers, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 1/7] hw/block/fdc: Let sector count be unsigned, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 2/7] hw/block/fdc: Let sector offset be unsigned,
Philippe Mathieu-Daudé <=
- [PATCH-for-5.2 3/7] hw/block/fdc: Use warn_report() instead of debug FLOPPY_DPRINTF() calls, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 4/7] hw/block/fdc: Convert debug FLOPPY_DPRINTF() to trace events, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 5/7] hw/block/fdc: Drop pointless FLOPPY_DPRINTF() call, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 6/7] hw/block/fdc: Use more descriptive TypeInfo names, Philippe Mathieu-Daudé, 2020/08/06
- [PATCH-for-5.2 7/7] hw/block/fdc: Add ASCII art schema of QOM relations, Philippe Mathieu-Daudé, 2020/08/06