[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v4 1/9] util: Add UUID API
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [PATCH v4 1/9] util: Add UUID API |
Date: |
Fri, 12 Aug 2016 10:01:26 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, 08/11 23:21, Richard Henderson wrote:
> On 08/11/2016 05:50 AM, Fam Zheng wrote:
> >+void qemu_uuid_bswap(QemuUUID *uuid)
> >+{
> >+ bswap32s((uint32_t *)&uuid->data[0]);
> >+ bswap16s((uint16_t *)&uuid->data[4]);
> >+ bswap16s((uint16_t *)&uuid->data[6]);
> >+}
>
> You have alignment problems here too. Perhaps you really did want
> to add uint32_t (and uint16_t?) as union members to QemuUUID.
But that may not be enough for embedded QemuUUID in a packed structure, such as
in block/vdi.c. So I'll also add an assertion here.
Fam
- [Qemu-block] [PATCH v4 0/9] UUID clean ups for 2.8, Fam Zheng, 2016/08/11
- [Qemu-block] [PATCH v4 2/9] vhdx: Use QEMU UUID API, Fam Zheng, 2016/08/11
- [Qemu-block] [PATCH v4 3/9] vdi: Use QEMU UUID API, Fam Zheng, 2016/08/11
- [Qemu-block] [PATCH v4 4/9] vpc: Use QEMU UUID API, Fam Zheng, 2016/08/11
- [Qemu-block] [PATCH v4 5/9] crypto: Switch to QEMU UUID API, Fam Zheng, 2016/08/11
- [Qemu-block] [PATCH v4 6/9] tests: No longer dependent on CONFIG_UUID, Fam Zheng, 2016/08/11
- [Qemu-block] [PATCH v4 7/9] configure: Remove detection code for UUID, Fam Zheng, 2016/08/11
- [Qemu-block] [PATCH v4 8/9] vl: Switch qemu_uuid to QemuUUID, Fam Zheng, 2016/08/11
- [Qemu-block] [PATCH v4 9/9] tests: Add uuid tests, Fam Zheng, 2016/08/11