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 should be MAX_SIZE_MDF_HEADER not "sizeof(mh)". So the buf[]
is used to fill the gap between mh and the first MakedumpfileDataHeader.

--
Regards
Qiao Nuohan

Reply via email to