From patchwork Fri Nov 2 15:54:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: block: vpc initialize the uuid footer field Date: Fri, 02 Nov 2012 05:54:24 -0000 From: Charles Arnold X-Patchwork-Id: 196583 Message-Id: <5093985002000091000828A4@novprvoes0310.provo.novell.com> To: Cc: Kevin Wolf block/vpc: Initialize the uuid field in the footer with a generated uuid. Signed-off-by: Charles Arnold 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));