From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KqDsD-0000xI-Qt for qemu-devel@nongnu.org; Wed, 15 Oct 2008 17:25:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqDsC-0000we-9U for qemu-devel@nongnu.org; Wed, 15 Oct 2008 17:25:41 -0400 Received: from [199.232.76.173] (port=37386 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqDsB-0000wX-U1 for qemu-devel@nongnu.org; Wed, 15 Oct 2008 17:25:40 -0400 Received: from bsdimp.com ([199.45.160.85]:55747 helo=harmony.bsdimp.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KqDsB-00011e-ET for qemu-devel@nongnu.org; Wed, 15 Oct 2008 17:25:39 -0400 Date: Wed, 15 Oct 2008 15:23:17 -0600 (MDT) Message-Id: <20081015.152317.-795139439.imp@bsdimp.com> Subject: Re: [Qemu-devel] Re: [PATCH 05/21] turn info kqemu into generic info accelerator From: "M. Warner Losh" In-Reply-To: <48F651B0.8030502@us.ibm.com> References: <1224107718-19128-1-git-send-email-glommer@redhat.com> <1224107718-19128-6-git-send-email-glommer@redhat.com> <48F651B0.8030502@us.ibm.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii 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, aliguori@us.ibm.com Cc: jan.kiszka@siemens.com, glommer@redhat.com, jes@sgi.com, avi@qumranet.com, gcosta@redhat.com, dmitry.baryshkov@siemens.com In message: <48F651B0.8030502@us.ibm.com> Anthony Liguori writes: : Glauber Costa wrote: : > From: Glauber Costa : > : > Yet another accel field: info. : > From this point on, "info kqemu" is no more. "info accelerator" should : > be used instead. : > : > Signed-off-by: Glauber Costa : > --- : > accel.c | 6 ++++++ : > accel.h | 6 ++++++ : > kqemu.c | 24 ++++++++++++++++++++++++ : > monitor.c | 36 +++++++++++++----------------------- : > 4 files changed, 49 insertions(+), 23 deletions(-) : > : > diff --git a/accel.c b/accel.c : > index 6776244..466fe67 100644 : > --- a/accel.c : > +++ b/accel.c : > @@ -8,6 +8,11 @@ int _accel_nop(void) : > return 0; : > } : > : > +int noaccel_info(CPUState *env, char *buf) : > +{ : > + return sprintf(buf, "no accelerator present.\n"); : > : : sprintf() is evil and never should be used. You should refactor this : patch for the info callback to take a buffer size and use snprintf(). why use sprintf for this? Warner