aboutsummaryrefslogtreecommitdiff
path: root/block/vpc.c
diff options
context:
space:
mode:
authorCharles Arnold <carnold@suse.com>2012-11-02 09:54:24 -0600
committerKevin Wolf <kwolf@redhat.com>2012-12-11 11:04:25 +0100
commit1fe1fa510aa3d4eb1fb4246d4951ef48e4c949c2 (patch)
tree2aec37afd74e8fb05ae9afff2eb1ecc0f8a46ab5 /block/vpc.c
parentd567e62f98d5789ff4d273b924a0474931c71e8b (diff)
downloadqemu-1fe1fa510aa3d4eb1fb4246d4951ef48e4c949c2.zip
qemu-1fe1fa510aa3d4eb1fb4246d4951ef48e4c949c2.tar.gz
qemu-1fe1fa510aa3d4eb1fb4246d4951ef48e4c949c2.tar.bz2
block: vpc initialize the uuid footer field
Initialize the uuid field in the footer with a generated uuid. Signed-off-by: Charles Arnold <carnold@suse.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/vpc.c')
-rw-r--r--block/vpc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/block/vpc.c b/block/vpc.c
index b6bf52f..f14c6ae1 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 <uuid/uuid.h>
+#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));