diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-27 14:29:15 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-27 14:29:15 +0000 |
commit | 378e2aea1b2ad216158cf172f7f218fe041f7b1f (patch) | |
tree | 295209def6dc26af028be352c3b6f7549cfc0a72 /block-vpc.c | |
parent | 5281966437e448e432da25cfba801e4dcf0b9460 (diff) |
block-vpc: Fix support for images > 4 GB (Kevin Wolf)
This patch fixes the truncation of sector offsets to 32 bits.
Signed-off-by: Kevin Wolf <kwolf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6464 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-vpc.c')
-rw-r--r-- | block-vpc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block-vpc.c b/block-vpc.c index f46ff8cd7..3eea506e7 100644 --- a/block-vpc.c +++ b/block-vpc.c @@ -256,7 +256,7 @@ static inline int64_t get_sector_offset(BlockDriverState *bs, if (pagetable_index >= s->max_table_entries || s->pagetable[pagetable_index] == 0xffffffff) return -1; // not allocated - bitmap_offset = 512 * s->pagetable[pagetable_index]; + bitmap_offset = 512 * (uint64_t) s->pagetable[pagetable_index]; block_offset = bitmap_offset + s->bitmap_size + (512 * pageentry_index); // We must ensure that we don't write to any sectors which are marked as |