From 1fe1fa510aa3d4eb1fb4246d4951ef48e4c949c2 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Fri, 2 Nov 2012 09:54:24 -0600 Subject: block: vpc initialize the uuid footer field 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 file changed, 6 insertions(+), 1 deletion(-) (limited to 'block/vpc.c') diff --git a/block/vpc.c b/block/vpc.c index b6bf52f140..f14c6ae196 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)); -- cgit v1.2.1