On 01/17/14 08:46, qiaonuohan wrote: > flatten format will be used when writing kdump-compressed format. The format > is > also used by makedumpfile, you can refer to the following URL to get more > detailed information about flatten format of kdump-compressed format: > http://sourceforge.net/projects/makedumpfile/ > > The two functions here are used to write start flat header and end flat header > to vmcore, and they will be called later when flatten format is used. > > struct MakedumpfileHeader stored at the head of vmcore is used to indicate the > vmcore is in flatten format. > > struct MakedumpfileHeader { > char signature[16]; /* = "makedumpfile" */ > int64_t type; /* = 1 */ > int64_t version; /* = 1 */ > }; > > And struct MakedumpfileDataHeader, with offset and buf_size set to -1, is used > to indicate the end of vmcore in flatten format. > > struct MakedumpfileDataHeader { > int64_t offset; /* = -1 */ > int64_t buf_size; /* = -1 */ > }; > > Signed-off-by: Qiao Nuohan <qiaonuo...@cn.fujitsu.com> > Reviewed-by: Laszlo Ersek <ler...@redhat.com> > --- > dump.c | 42 ++++++++++++++++++++++++++++++++++++++++++ > include/sysemu/dump.h | 17 +++++++++++++++++ > 2 files changed, 59 insertions(+), 0 deletions(-)
OK, comparing this with v6 02/11, I can see that you changed write_start_flat_header(): - element type of "buf" from char to uint8_t, - the array is now dynamically allocated, - it is not leaked even in case of error. My R-b stands. Thanks Laszlo