From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K4Nqu-0001Xt-HD for qemu-devel@nongnu.org; Thu, 05 Jun 2008 18:22:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K4Nqt-0001XU-4x for qemu-devel@nongnu.org; Thu, 05 Jun 2008 18:22:36 -0400 Received: from [199.232.76.173] (port=51603 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4Nqt-0001XR-0F for qemu-devel@nongnu.org; Thu, 05 Jun 2008 18:22:35 -0400 Received: from mail.codesourcery.com ([65.74.133.4]:35819) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K4Nqs-0005vr-H1 for qemu-devel@nongnu.org; Thu, 05 Jun 2008 18:22:34 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 4/5] Use libuuid if available. Date: Thu, 5 Jun 2008 23:22:17 +0100 References: <20080605083536.11678.439.stgit@gleb-debian.qumranet.com.qumranet.com> <20080605202024.GA11941@minantech.com> <48484C2B.1000101@codemonkey.ws> In-Reply-To: <48484C2B.1000101@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806052322.17583.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thursday 05 June 2008, Anthony Liguori wrote: > Gleb Natapov wrote: > > Anthony, thanks for the review. > > > > On Thu, Jun 05, 2008 at 10:18:15AM -0500, Anthony Liguori wrote: > >>> @@ -256,8 +260,14 @@ static void do_info_name(void) > >>> static void do_info_uuid(void) > >>> { > >>> +#ifdef CONFIG_UUID > >>> + char uuid_str[37]; > >>> + uuid_unparse(qemu_uuid, uuid_str); > >>> + term_printf("%s\n", uuid_str); > >>> +#else > >> > >> Just use a printf() string here again to eliminate the need for > >> CONFIG_UUID. > > > > So may be do not use libuuid at all and just write simple uuid string > > parsing function? > > For parsing, sure. But uuid generation requires implementing an > algorithm from an RFC. I think that warrants using libuuid. Can we punt this to management tools? Having qemu create randomly different machines seems like it's going to cause as many problems as it solves. We've already got things like MAC addresses which are fixed but need to be unique. Paul