From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K4Y7e-0007ZH-MA for qemu-devel@nongnu.org; Fri, 06 Jun 2008 05:20:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K4Y7a-0007Ys-Dm for qemu-devel@nongnu.org; Fri, 06 Jun 2008 05:20:34 -0400 Received: from [199.232.76.173] (port=57946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4Y7Z-0007Yb-TA for qemu-devel@nongnu.org; Fri, 06 Jun 2008 05:20:29 -0400 Received: from mx1.redhat.com ([66.187.233.31]:36244) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K4Y7Y-000507-H0 for qemu-devel@nongnu.org; Fri, 06 Jun 2008 05:20:29 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m569IuU3018278 for ; Fri, 6 Jun 2008 05:19:02 -0400 Received: from file.fab.redhat.com (file.fab.redhat.com [10.33.63.6]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m569Itcu006038 for ; Fri, 6 Jun 2008 05:18:56 -0400 Received: (from berrange@localhost) by file.fab.redhat.com (8.13.1/8.13.1/Submit) id m569ItYO028127 for qemu-devel@nongnu.org; Fri, 6 Jun 2008 10:18:55 +0100 Date: Fri, 6 Jun 2008 10:18:55 +0100 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] [PATCH 4/5] Use libuuid if available. Message-ID: <20080606091855.GB25958@redhat.com> References: <20080605083536.11678.439.stgit@gleb-debian.qumranet.com.qumranet.com> <20080605202024.GA11941@minantech.com> <48484C2B.1000101@codemonkey.ws> <200806052322.17583.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200806052322.17583.paul@codesourcery.com> Reply-To: "Daniel P. Berrange" , 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 Thu, Jun 05, 2008 at 11:22:17PM +0100, 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. FYI, once you have the -uuid argument supported in QEMU, I'll update libvirt to use it, and libvirt will always generate a random UUID when invoking QEMU if the user didn't specify one explicitly. So for any management tool using libvirt, there's no need for QEMU itself to generate random UUIDs. Regards, Daniel. -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|