]> git.proxmox.com Git - mirror_qemu.git/commit - dump.c
dump: simplify write_start_flat_header()
authorLaszlo Ersek <lersek@redhat.com>
Tue, 20 May 2014 11:39:42 +0000 (13:39 +0200)
committerLuiz Capitulino <lcapitulino@redhat.com>
Wed, 11 Jun 2014 14:10:28 +0000 (10:10 -0400)
commit92ba1401e0f81ea170803045c1ae366bf5d9d87e
tree305f1cd5d33dfa900a5ebefc885087fd08ebd0d2
parentae3f88f60fb9f42bb3679311c2fbff8e1868ea47
dump: simplify write_start_flat_header()

Currently, the function
- defines and populates an auto variable of type MakedumpfileHeader
- allocates and zeroes a buffer of size MAX_SIZE_MDF_HEADER (4096)
- copies the former into the latter (covering an initial portion of the
  latter)

Fill in the MakedumpfileHeader structure in its final place (the alignment
is OK because the structure lives at the address returned by g_malloc0()).

Approximately-suggested-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
dump.c