diff options
Diffstat (limited to 'block/raw-win32.c')
-rw-r--r-- | block/raw-win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/raw-win32.c b/block/raw-win32.c index 902eab6100..1e1880d528 100644 --- a/block/raw-win32.c +++ b/block/raw-win32.c @@ -511,8 +511,8 @@ static int raw_create(const char *filename, QemuOpts *opts, Error **errp) strstart(filename, "file:", &filename); /* Read out options */ - total_size = - qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0) / 512; + total_size = DIV_ROUND_UP(qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0), + BDRV_SECTOR_SIZE); fd = qemu_open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644); |