From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K4PfS-0004De-5V for qemu-devel@nongnu.org; Thu, 05 Jun 2008 20:18:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K4PfQ-0004DS-2M for qemu-devel@nongnu.org; Thu, 05 Jun 2008 20:18:52 -0400 Received: from [199.232.76.173] (port=59554 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4PfP-0004DP-VN for qemu-devel@nongnu.org; Thu, 05 Jun 2008 20:18:52 -0400 Received: from hs-out-0708.google.com ([64.233.178.250]:51621) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K4PfP-0002v6-Rk for qemu-devel@nongnu.org; Thu, 05 Jun 2008 20:18:51 -0400 Received: by hs-out-0708.google.com with SMTP id k27so552471hsc.2 for ; Thu, 05 Jun 2008 17:18:51 -0700 (PDT) Message-ID: <4848825D.1070707@codemonkey.ws> Date: Thu, 05 Jun 2008 19:18:37 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 4/5] Use libuuid if available. References: <20080605083536.11678.439.stgit@gleb-debian.qumranet.com.qumranet.com> <20080605202024.GA11941@minantech.com> <48484C2B.1000101@codemonkey.ws> <200806052322.17583.paul@codesourcery.com> In-Reply-To: <200806052322.17583.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org Paul Brook wrote: > 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. > Yeah, I was thinking this myself too. It's not really worth it for just uuid generation. Regards, Anthony Liguori > Paul >