qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 2/9] block: vhdx - add header update capabili


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v2 2/9] block: vhdx - add header update capability.
Date: Tue, 6 Aug 2013 10:34:25 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 05.08.2013 um 17:09 hat Jeff Cody geschrieben:
> On Mon, Aug 05, 2013 at 05:05:36PM +0200, Kevin Wolf wrote:
> > Am 01.08.2013 um 05:23 hat Jeff Cody geschrieben:
> > > This adds the ability to update the headers in a VHDX image, including
> > > generating a new MS-compatible GUID.
> > > 
> > > As VHDX depends on uuid.h, VHDX is now a configurable build option.  If
> > > VHDX support is enabled, that will also enable uuid as well.  The
> > > default is to have VHDX enabled.
> > > 
> > > To enable/disable VHDX:  --enable-vhdx, --disable-vhdx
> > > 
> > > Signed-off-by: Jeff Cody <address@hidden>
> > 
> > I knew I'd forget to mention something I had seen...
> > 
> > > +    /* overwrite the actual VHDXHeader portion */
> > > +    memcpy(buffer, inactive_header, sizeof(VHDXHeader));
> > > +    inactive_header->checksum = vhdx_update_checksum(buffer,
> > > +                                                     VHDX_HEADER_SIZE, 
> > > 4);
> > 
> > This I would prefer as offsetof(VHDXHeader, checksum) instead of a magic
> > number 4.
> 
> Who doesn't like a little bit of magic? :)

I think I would have accepted a properly implemented qemu_rand(). :-)

Kevin



reply via email to

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