From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXYeJ-0000ih-HK for qemu-devel@nongnu.org; Mon, 25 Aug 2008 05:46:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXYeF-0000fH-E3 for qemu-devel@nongnu.org; Mon, 25 Aug 2008 05:46:08 -0400 Received: from [199.232.76.173] (port=46450 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXYeF-0000ex-2t for qemu-devel@nongnu.org; Mon, 25 Aug 2008 05:46:07 -0400 Received: from il.qumranet.com ([212.179.150.194]:14372) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXYeE-0002Rr-I1 for qemu-devel@nongnu.org; Mon, 25 Aug 2008 05:46:06 -0400 Received: from gleb-debian.qumranet.com (gleb-debian.qumranet.com.qumranet.com [172.16.15.143]) by il.qumranet.com (Postfix) with ESMTP id 6F8F7250310 for ; Mon, 25 Aug 2008 12:46:04 +0300 (IDT) Date: Mon, 25 Aug 2008 12:46:04 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] [PATCH 3/6] Add "info uuid" command to monitor. Message-ID: <20080825094604.GJ6192@minantech.com> References: <20080824113258.5652.92531.stgit@gleb-debian.qumranet.com.qumranet.com> <20080824113314.5652.47140.stgit@gleb-debian.qumranet.com.qumranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Sun, Aug 24, 2008 at 08:43:41PM +0300, Blue Swirl wrote: > On 8/24/08, Gleb Natapov wrote: > > Signed-off-by: Gleb Natapov > > --- > > > > monitor.c | 13 +++++++++++++ > > 1 files changed, 13 insertions(+), 0 deletions(-) > > > > diff --git a/monitor.c b/monitor.c > > index e71f49e..1e477bb 100644 > > --- a/monitor.c > > +++ b/monitor.c > > @@ -253,6 +253,17 @@ static void do_info_name(void) > > term_printf("%s\n", qemu_name); > > } > > > > +static void do_info_uuid(void) > > +{ > > + char uuid_str[37]; > > + sprintf(uuid_str, UUID_FMT, qemu_uuid[0], qemu_uuid[1], qemu_uuid[2], > > + qemu_uuid[3], qemu_uuid[4], qemu_uuid[5], qemu_uuid[6], > > + qemu_uuid[7], qemu_uuid[8], qemu_uuid[9], qemu_uuid[10], > > + qemu_uuid[11], qemu_uuid[12], qemu_uuid[13], qemu_uuid[14], > > + qemu_uuid[15]); > > + term_printf("%s\n", uuid_str); > > Please use snprintf. Or why not directly term_printf(UUID_FMT "\n", > qemu_uuid[0] etc.? Don't know. I've removed redundant sprintf. Thanks. -- Gleb.