Re: [Qemu-devel] [PATCH v3 5/6] vmdk: store fields of VmdkMetaData in cpu endian

2013-04-25 Thread Stefan Hajnoczi
On Wed, Apr 24, 2013 at 08:44:34PM +0800, Fam Zheng wrote: > @@ -938,7 +938,7 @@ static int get_cluster_offset(BlockDriverState *bs, > } > > if (m_data) { > -m_data->offset = tmp; > +m_data->offset = *cluster_offset; tmp can be dropped now: -tmp = cpu_t

[Qemu-devel] [PATCH v3 5/6] vmdk: store fields of VmdkMetaData in cpu endian

2013-04-24 Thread Fam Zheng
Previously VmdkMetaData.offset is stored little endian while other fields are cpu endian. This changes offset to cpu endian and convert before writing to image. Signed-off-by: Fam Zheng --- block/vmdk.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/vmdk.c