提交 1fe1fa51 编写于 作者: C Charles Arnold 提交者: Kevin Wolf

block: vpc initialize the uuid footer field

Initialize the uuid field in the footer with a generated uuid.
Signed-off-by: NCharles Arnold <carnold@suse.com>
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 d567e62f
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册