qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: Fix vpc initialization of the Dynamic Di


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH] block: Fix vpc initialization of the Dynamic Disk Header
Date: Tue, 08 Nov 2011 21:16:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

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 initializing
> only the first 4 bytes, images generated by Microsoft on Windows initialize 
> all 8 bytes.
> 
> Failure to initialize all 8 bytes results in errors from utilities
> that check specifically for the complete Data Offset field initialization.
> 
> Signed-off-by: Charles Arnold <address@hidden>

Reviewed-by: Andreas Färber <address@hidden>

Kevin, can you please apply this for 1.0? Thanks!

Andreas

> 
> 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, 
> QEMUOptionParameter *options)
> 
>      memcpy(dyndisk_header->magic, "cxsparse", 8);
> 
> -    dyndisk_header->data_offset = be64_to_cpu(0xFFFFFFFF);
> +    dyndisk_header->data_offset = be64_to_cpu(0xFFFFFFFFFFFFFFFFULL);
>      dyndisk_header->table_offset = be64_to_cpu(3 * 512);
>      dyndisk_header->version = be32_to_cpu(0x00010000);
>      dyndisk_header->block_size = be32_to_cpu(block_size);

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]