diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-12-21 13:14:06 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-12-21 13:14:06 +0000 |
commit | c3e7267935f27fe5570faffd1483b33be3258653 (patch) | |
tree | f38b876b0b160afdc63756c3e7675e2e728ad0fd /util | |
parent | 4da5c51cac8363f86ec92dc99c38f9382d617647 (diff) | |
parent | bfab1aede07f864b8fbd749c3a0545b949b4cc84 (diff) |
Merge remote-tracking branch 'remotes/famz/tags/staging-pull-request' into staging
# gpg: Signature made Thu 21 Dec 2017 01:51:20 GMT
# gpg: using RSA key 0xCA35624C6A9171C6
# gpg: Good signature from "Fam Zheng <famz@redhat.com>"
# Primary key fingerprint: 5003 7CB7 9706 0F76 F021 AD56 CA35 624C 6A91 71C6
* remotes/famz/tags/staging-pull-request:
util: add is_equal to UUID API
Revert "docker: Enable features explicitly in test-full"
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/uuid.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/util/uuid.c b/util/uuid.c index dd6b5fdf05..ebf06c049a 100644 --- a/util/uuid.c +++ b/util/uuid.c @@ -41,7 +41,12 @@ void qemu_uuid_generate(QemuUUID *uuid) int qemu_uuid_is_null(const QemuUUID *uu) { static QemuUUID null_uuid; - return memcmp(uu, &null_uuid, sizeof(QemuUUID)) == 0; + return qemu_uuid_is_equal(uu, &null_uuid); +} + +int qemu_uuid_is_equal(const QemuUUID *lhv, const QemuUUID *rhv) +{ + return memcmp(lhv, rhv, sizeof(QemuUUID)) == 0; } void qemu_uuid_unparse(const QemuUUID *uuid, char *out) |