block/vdi: allow disk sizes not multiple of block size
commit95a2f9bc588c3f83375d87b0a9394f89a1bcfada
authorFrançois Revol <revol@free.fr>
Tue, 22 Dec 2009 11:40:49 +0000 (22 12:40 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 8 Jan 2010 15:58:40 +0000 (8 09:58 -0600)
tree8e885b344e8e959ba2afb7397601554b450974ed
parentceb696159d569db5b2a7659ce38752398c236742
block/vdi: allow disk sizes not multiple of block size

The disk image I created from my old laptop disk with VBoxManage
internalcommand converthd obviously was not a multiple of 1MB as when
created from scratch. This fixes QEMU refusing it. We still require the
size to be a multiple of sector size though.
It then boots correctly.

Allow opening VDI images with size not multiple of 1MB (as when converted from a raw disk).

Signed-off-by: François Revol <revol@free.fr>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block/vdi.c