aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-09-21 12:27:16 +0800
committerFam Zheng <famz@redhat.com>2016-09-23 11:42:52 +0800
commitcb6414dfec8a308e68529b0fd2a454403c05bbb3 (patch)
treed66548acfb9abde899d704d3b5fee687dd49c9b7 /block
parent3630be75d8eda7811f5783d1dc50f4d8682fdaec (diff)
vhdx: Use QEMU UUID API
This removes our dependency to libuuid, so that the driver can always be built. Similar to how we handled data plane configure options, --enable-vhdx and --disable-vhdx are also changed to a nop with a message saying it's obsolete. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Message-Id: <1474432046-325-4-git-send-email-famz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/Makefile.objs2
-rw-r--r--block/vhdx-endian.c3
-rw-r--r--block/vhdx.c9
3 files changed, 5 insertions, 9 deletions
diff --git a/block/Makefile.objs b/block/Makefile.objs
index cb158e9275..7d4031dae5 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -2,7 +2,7 @@ block-obj-y += raw_bsd.o qcow.o vdi.o vmdk.o cloop.o bochs.o vpc.o vvfat.o dmg.o
block-obj-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o
block-obj-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o
block-obj-y += qed-check.o
-block-obj-$(CONFIG_VHDX) += vhdx.o vhdx-endian.o vhdx-log.o
+block-obj-y += vhdx.o vhdx-endian.o vhdx-log.o
block-obj-y += quorum.o
block-obj-y += parallels.o blkdebug.o blkverify.o blkreplay.o
block-obj-y += block-backend.o snapshot.o qapi.o
diff --git a/block/vhdx-endian.c b/block/vhdx-endian.c
index c306b90d54..429d7556bd 100644
--- a/block/vhdx-endian.c
+++ b/block/vhdx-endian.c
@@ -21,9 +21,6 @@
#include "qemu/bswap.h"
#include "block/vhdx.h"
-#include <uuid/uuid.h>
-
-
/*
* All the VHDX formats on disk are little endian - the following
* are helper import/export functions to correctly convert
diff --git a/block/vhdx.c b/block/vhdx.c
index 75ef2b1c2d..0ba2f0a2f9 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -25,8 +25,7 @@
#include "qemu/bswap.h"
#include "block/vhdx.h"
#include "migration/migration.h"
-
-#include <uuid/uuid.h>
+#include "qemu/uuid.h"
/* Options for VHDX creation */
@@ -213,11 +212,11 @@ bool vhdx_checksum_is_valid(uint8_t *buf, size_t size, int crc_offset)
*/
void vhdx_guid_generate(MSGUID *guid)
{
- uuid_t uuid;
+ QemuUUID uuid;
assert(guid != NULL);
- uuid_generate(uuid);
- memcpy(guid, uuid, sizeof(MSGUID));
+ qemu_uuid_generate(&uuid);
+ memcpy(guid, &uuid, sizeof(MSGUID));
}
/* Check for region overlaps inside the VHDX image */