From 54a0a81441315a638fc5678cdf27421864840013 Mon Sep 17 00:00:00 2001 Message-Id: <54a0a81441315a638fc5678cdf27421864840013.1378813438.git.minovotn@redhat.com> In-Reply-To: References: From: Jeffrey Cody Date: Wed, 28 Aug 2013 13:14:52 +0200 Subject: [PATCH 10/13] block: vpc initialize the uuid footer field RH-Author: Jeffrey Cody Message-id: <5dac6b8aa678128aedfd5b63ffbee5f14a585824.1377694139.git.jcody@redhat.com> Patchwork-id: 53845 O-Subject: [RHEL6.5 qemu-kvm PATCH 10/13] block: vpc initialize the uuid footer field Bugzilla: 999779 RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Kevin Wolf RH-Acked-by: Fam Zheng 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 (cherry picked from commit 1fe1fa510aa3d4eb1fb4246d4951ef48e4c949c2) Conflicts: block/vpc.c RHEL6 Notes: - conflict was due to the head including "migration.h" Signed-off-by: Jeff Cody --- block/vpc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) Signed-off-by: Michal Novotny --- block/vpc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block/vpc.c b/block/vpc.c index e01364d..4b6a132 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -25,6 +25,9 @@ #include "qemu-common.h" #include "block_int.h" #include "module.h" +#if defined(CONFIG_UUID) +#include +#endif /**************************************************************/ @@ -734,7 +737,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)); -- 1.7.11.7