Re: [Qemu-devel] [PATCH 4/7] block: initial VHDX driver support framework - supports open and probe

2013-03-08 Thread Kevin Wolf
Am 07.03.2013 um 17:12 hat Stefan Hajnoczi geschrieben: > On Thu, Mar 07, 2013 at 10:23:54AM -0500, Jeff Cody wrote: > > On Thu, Mar 07, 2013 at 03:30:44PM +0100, Stefan Hajnoczi wrote: > > > On Wed, Mar 06, 2013 at 09:48:11AM -0500, Jeff Cody wrote: > > > > +ret = bdrv_pread(bs->file, s->bat_o

Re: [Qemu-devel] [PATCH 4/7] block: initial VHDX driver support framework - supports open and probe

2013-03-07 Thread Stefan Hajnoczi
On Thu, Mar 07, 2013 at 10:23:54AM -0500, Jeff Cody wrote: > On Thu, Mar 07, 2013 at 03:30:44PM +0100, Stefan Hajnoczi wrote: > > On Wed, Mar 06, 2013 at 09:48:11AM -0500, Jeff Cody wrote: > > > +ret = bdrv_pread(bs->file, s->bat_offset, s->bat, s->bat_rt.length); > > > + > > > +for (i = 0;

Re: [Qemu-devel] [PATCH 4/7] block: initial VHDX driver support framework - supports open and probe

2013-03-07 Thread Jeff Cody
On Thu, Mar 07, 2013 at 03:30:44PM +0100, Stefan Hajnoczi wrote: > On Wed, Mar 06, 2013 at 09:48:11AM -0500, Jeff Cody wrote: > > +#define leguid_to_cpus(guid) do { \ > > +le32_to_cpus(&(guid)->data1); \ > > +le16_to_cpus(&(guid)->data2); \ > > +le16_to_cpus(&(guid)->data3); } while (0)

Re: [Qemu-devel] [PATCH 4/7] block: initial VHDX driver support framework - supports open and probe

2013-03-07 Thread Stefan Hajnoczi
On Wed, Mar 06, 2013 at 09:48:11AM -0500, Jeff Cody wrote: > +#define leguid_to_cpus(guid) do { \ > +le32_to_cpus(&(guid)->data1); \ > +le16_to_cpus(&(guid)->data2); \ > +le16_to_cpus(&(guid)->data3); } while (0) This should be a function. Please avoid macros. > +static const ms_guid

[Qemu-devel] [PATCH 4/7] block: initial VHDX driver support framework - supports open and probe

2013-03-06 Thread Jeff Cody
This is the initial block driver framework for VHDX image support (i.e. Hyper-V image file formats), that supports opening VHDX files, and parsing the headers. This commit does not yet enable: - reading - writing - updating the header - differencing files (images with parents)