From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNs5i-00008D-UY for qemu-devel@nongnu.org; Tue, 08 Nov 2011 15:16:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNs5h-0003kg-Qb for qemu-devel@nongnu.org; Tue, 08 Nov 2011 15:16:18 -0500 Received: from cantor2.suse.de ([195.135.220.15]:53697 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNs5h-0003k7-Lx for qemu-devel@nongnu.org; Tue, 08 Nov 2011 15:16:17 -0500 Message-ID: <4EB98E03.9090009@suse.de> Date: Tue, 08 Nov 2011 21:16:03 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <4EB91FA20200009100076E0E@novprvoes0310.provo.novell.com> In-Reply-To: <4EB91FA20200009100076E0E@novprvoes0310.provo.novell.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] block: Fix vpc initialization of the Dynamic Disk Header List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Charles Arnold , qemu-devel@nongnu.org Am 08.11.2011 20:25, schrieb Charles Arnold: > The Data Offset field in the Dynamic Disk Header is an 8 byte field. > Although the specification (2006-10-11) gives an example of initializin= g > only the first 4 bytes, images generated by Microsoft on Windows initia= lize=20 > all 8 bytes. >=20 > Failure to initialize all 8 bytes results in errors from utilities > that check specifically for the complete Data Offset field initializati= on. >=20 > Signed-off-by: Charles Arnold Reviewed-by: Andreas F=E4rber Kevin, can you please apply this for 1.0? Thanks! Andreas >=20 > diff --git a/block/vpc.c b/block/vpc.c > index 416f489..35ac3fd 100644 > --- a/block/vpc.c > +++ b/block/vpc.c > @@ -585,7 +585,7 @@ static int vpc_create(const char *filename, QEMUOpt= ionParameter *options) >=20 > memcpy(dyndisk_header->magic, "cxsparse", 8); >=20 > - dyndisk_header->data_offset =3D be64_to_cpu(0xFFFFFFFF); > + dyndisk_header->data_offset =3D be64_to_cpu(0xFFFFFFFFFFFFFFFFULL)= ; > dyndisk_header->table_offset =3D be64_to_cpu(3 * 512); > dyndisk_header->version =3D be32_to_cpu(0x00010000); > dyndisk_header->block_size =3D be32_to_cpu(block_size); --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg