From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVanP-0007RW-0i for qemu-devel@nongnu.org; Fri, 05 Aug 2016 04:48:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVanN-0007Xs-4S for qemu-devel@nongnu.org; Fri, 05 Aug 2016 04:47:57 -0400 Date: Fri, 5 Aug 2016 16:47:49 +0800 From: Fam Zheng Message-ID: <20160805084749.GC8458@ad.usersys.redhat.com> References: <1470129518-21087-1-git-send-email-famz@redhat.com> <1470129518-21087-4-git-send-email-famz@redhat.com> <57A3A6D8.1080500@redhat.com> <874m6z9160.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874m6z9160.fsf@dusky.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH 3/7] vdi: Use QEMU UUID API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Eric Blake , Stefan Weil , qemu-devel@nongnu.org, kwolf@redhat.com, qemu-block@nongnu.org, mdroth@linux.vnet.ibm.com, mreitz@redhat.com, pbonzini@redhat.com On Fri, 08/05 08:31, Markus Armbruster wrote: > Eric Blake writes: > > > On 08/04/2016 12:58 PM, Stefan Weil wrote: > >> Hi, > >> > >> On 08/02/16 11:18, Fam Zheng wrote: > >>> The QEMU UUID api, including the data structure (qemu_uuid_t), is fully > >>> compatible with libuuid. Use it, and remove the unused code. > >>> > >>> Signed-off-by: Fam Zheng > >>> --- > >>> block/vdi.c | 49 ++++++++++--------------------------------------- > >>> 1 file changed, 10 insertions(+), 39 deletions(-) > >>> > > > >>> @@ -182,10 +153,10 @@ typedef struct { > >>> uint32_t block_extra; /* unused here */ > >>> uint32_t blocks_in_image; > >>> uint32_t blocks_allocated; > >>> - uuid_t uuid_image; > >>> - uuid_t uuid_last_snap; > >>> - uuid_t uuid_link; > >>> - uuid_t uuid_parent; > >>> + qemu_uuid_t uuid_image; > >>> + qemu_uuid_t uuid_last_snap; > >>> + qemu_uuid_t uuid_link; > >>> + qemu_uuid_t uuid_parent; > >> > >> As far as I remember, _t should be avoided because that postfix is > >> reserved by POSIX. Should we use qemu_uuid, or can we ignore POSIX > >> because the type name uses the qemu_ prefix? > > > > Correct that POSIX reserved all _t (which is a bit broad, oh well), and > > also correct that we can take the risk of using it anyways (but if POSIX > > ever standardizes something, we get to keep both of our broken pieces). > > > > > >> Either with qemu_uuid_t or with qemu_uuid: > > > > I thought our coding standard preferred QemuUUID or something similar in > > camelcase, rather than lower case. > > Correct. It's ugly (in my opinion), but we should stick to it, so it's > at least consistently ugly. > > > But now we are just painting a > > bikeshed, so I won't strongly object. > > I'd prefer QemuUUID. Fair enough. If QEMUUUID wasn't so UNREADABLE, I'd have used it. Will change to QemuUUID. It's a bit more acceptable to me. Fam