On 08/12/2016 03:01 AM, Fam Zheng wrote:
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]
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 align
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
A number of different places across the code base use CONFIG_UUID. Some
of them are soft dependency, some are not built if libuuid is not
available, some come with dummy fallback, some throws runtime error.
It is hard to maintain, and hard to reason for users.
Since UUID is a simple standard with