Re: [Qemu-devel] [PATCH v5 2/9] dump: Add API to write header of flatten format

2013-07-15 Thread Stefan Hajnoczi
On Tue, Jul 09, 2013 at 03:30:07PM +0800, Qiao Nuohan wrote: +static int write_start_flat_header(int fd) +{ +char buf[MAX_SIZE_MDF_HEADER]; +MakedumpfileHeader mh; Why is buf[] necessary? You can write mh directly.

Re: [Qemu-devel] [PATCH v5 2/9] dump: Add API to write header of flatten format

2013-07-15 Thread Qiao Nuohan
On 07/16/2013 10:06 AM, Stefan Hajnoczi wrote: On Tue, Jul 09, 2013 at 03:30:07PM +0800, Qiao Nuohan wrote: +static int write_start_flat_header(int fd) +{ +char buf[MAX_SIZE_MDF_HEADER]; +MakedumpfileHeader mh; Why is buf[] necessary? You can write mh directly. The size of header

[Qemu-devel] [PATCH v5 2/9] dump: Add API to write header of flatten format

2013-07-09 Thread Qiao Nuohan
flatten format may be used when writing kdump-compressed format. To get more detailed information about flatten format of kdump-compressed format, please refer to the following URL: http://sourceforge.net/projects/makedumpfile/ The two functions here are used to write start flat header and end