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

Re: [libvirt] [PATCH] Compressed save image format for Qemu.



On Wed, 2009-08-12 at 12:04 +0100, Daniel P. Berrange wrote:
> On Tue, Aug 11, 2009 at 01:25:59PM +0200, Chris Lalancette wrote:

> >  struct qemud_save_header {
> >      char magic[sizeof(QEMUD_SAVE_MAGIC)-1];
> >      int version;
> >      int xml_len;
> >      int was_running;
> > -    int unused[16];
> > +    char compressed;
> > +    int unused[15];
> >  };
> 
> Little mistake here - you removed sizeof(int) bytes, but only
> added sizeof(char) replacement.

struct alignment will cause padding to be added between the fields.

Cheers,
Mark.


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