Re: [Qemu-devel] [PATCH v2 1/8] util: Add UUID API

2016-08-08 Thread Fam Zheng
On Mon, 08/08 15:51, Jeff Cody wrote: > > > +typedef unsigned char QemuUUID[16]; > > > > I'm afraid this typedef is problematic. Consider: > > > > void use_uuid(QemuUUID uuid) > > { > > printf("sizeof(uuid) %zd\n", sizeof(uuid)); > > uuid[0]++; > > } > > > >

Re: [Qemu-devel] [PATCH v2 1/8] util: Add UUID API

2016-08-08 Thread Jeff Cody
On Mon, Aug 08, 2016 at 01:07:33PM +0200, Markus Armbruster wrote: > Fam Zheng writes: > > > 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

Re: [Qemu-devel] [PATCH v2 1/8] util: Add UUID API

2016-08-08 Thread Markus Armbruster
Fam Zheng writes: > 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

[Qemu-devel] [PATCH v2 1/8] util: Add UUID API

2016-08-08 Thread Fam Zheng
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