From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K4M3v-0008RI-41 for qemu-devel@nongnu.org; Thu, 05 Jun 2008 16:27:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K4M3t-0008Qu-5H for qemu-devel@nongnu.org; Thu, 05 Jun 2008 16:27:54 -0400 Received: from [199.232.76.173] (port=51458 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4M3t-0008Qr-0u for qemu-devel@nongnu.org; Thu, 05 Jun 2008 16:27:53 -0400 Received: from an-out-0708.google.com ([209.85.132.246]:51117) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K4M3s-000601-PI for qemu-devel@nongnu.org; Thu, 05 Jun 2008 16:27:52 -0400 Received: by an-out-0708.google.com with SMTP id d18so236657and.130 for ; Thu, 05 Jun 2008 13:27:51 -0700 (PDT) Message-ID: <48484C2B.1000101@codemonkey.ws> Date: Thu, 05 Jun 2008 15:27:23 -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> <20080605083551.11678.57336.stgit@gleb-debian.qumranet.com.qumranet.com> <484803B7.50908@codemonkey.ws> <20080605202024.GA11941@minantech.com> In-Reply-To: <20080605202024.GA11941@minantech.com> Content-Type: text/plain; charset=us-ascii; 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: qemu-devel@nongnu.org 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. So I'd say only use libuuid for generating random uuids. Regards, Anthony Liguori > -- > Gleb. > > >