From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXJct-0005gY-4T for qemu-devel@nongnu.org; Sun, 24 Aug 2008 13:43:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXJcs-0005gM-Lx for qemu-devel@nongnu.org; Sun, 24 Aug 2008 13:43:42 -0400 Received: from [199.232.76.173] (port=33354 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXJcs-0005gJ-Ek for qemu-devel@nongnu.org; Sun, 24 Aug 2008 13:43:42 -0400 Received: from wf-out-1314.google.com ([209.85.200.175]:53535) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXJcs-0006wu-6y for qemu-devel@nongnu.org; Sun, 24 Aug 2008 13:43:42 -0400 Received: by wf-out-1314.google.com with SMTP id 27so1545828wfd.4 for ; Sun, 24 Aug 2008 10:43:41 -0700 (PDT) Message-ID: Date: Sun, 24 Aug 2008 20:43:41 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH 3/6] Add "info uuid" command to monitor. In-Reply-To: <20080824113314.5652.47140.stgit@gleb-debian.qumranet.com.qumranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080824113258.5652.92531.stgit@gleb-debian.qumranet.com.qumranet.com> <20080824113314.5652.47140.stgit@gleb-debian.qumranet.com.qumranet.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 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.?