From patchwork Thu Dec 13 15:10:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [08/43] block: vpc initialize the uuid footer field Date: Thu, 13 Dec 2012 05:10:15 -0000 From: Kevin Wolf X-Patchwork-Id: 206182 Message-Id: <1355411450-12761-9-git-send-email-kwolf@redhat.com> To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Charles Arnold Initialize the uuid field in the footer with a generated uuid. Signed-off-by: Charles Arnold Reviewed-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- block/vpc.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index b6bf52f..f14c6ae 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -26,6 +26,9 @@ #include "block_int.h" #include "module.h" #include "migration.h" +#if defined(CONFIG_UUID) +#include +#endif /**************************************************************/ @@ -739,7 +742,9 @@ static int vpc_create(const char *filename, QEMUOptionParameter *options) footer->type = be32_to_cpu(disk_type); - /* TODO uuid is missing */ +#if defined(CONFIG_UUID) + uuid_generate(footer->uuid); +#endif footer->checksum = be32_to_cpu(vpc_checksum(buf, HEADER_SIZE));