From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUm38-0000T6-72 for qemu-devel@nongnu.org; Tue, 02 Aug 2016 22:36:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUm37-0007bi-5z for qemu-devel@nongnu.org; Tue, 02 Aug 2016 22:36:50 -0400 Date: Wed, 3 Aug 2016 10:36:40 +0800 From: Fam Zheng Message-ID: <20160803023640.GC8117@ad.usersys.redhat.com> References: <1470129518-21087-1-git-send-email-famz@redhat.com> <1470129518-21087-2-git-send-email-famz@redhat.com> <1180678412.13134125.1470167146088.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1180678412.13134125.1470167146088.JavaMail.zimbra@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/7] util: Add UUID API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, qemu-block@nongnu.org, armbru@redhat.com, mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, sw@weilnetz.de, mreitz@redhat.com On Tue, 08/02 15:45, Paolo Bonzini wrote: > > > ----- Original Message ----- > > From: "Fam Zheng" > > To: qemu-devel@nongnu.org > > Cc: famz@redhat.com, berrange@redhat.com, pbonzini@redhat.com, kwolf@redhat.com, mreitz@redhat.com, > > mdroth@linux.vnet.ibm.com, armbru@redhat.com, sw@weilnetz.de, qemu-block@nongnu.org > > Sent: Tuesday, August 2, 2016 11:18:32 AM > > Subject: [PATCH 1/7] util: Add UUID API > > > > 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 only a small number of operations, > > it is cleaner to have a central support in libqemuutil. This patch adds > > qemu_uuid_* the functions so that all uuid users in the code base can > > rely on. Except for qemu_uuid_generate which is new code, all other > > functions are just copy from existing fallbacks from other files. > > How is g_random_* seeded? According to glib doc: > GLib changed the seeding algorithm for the pseudo-random number generator > Mersenne Twister, as used by GRand. The urandom source is /dev/urandom (or time based if unavailable). (RFC 4122 explicitly accepts pseudo-random.) Fam