qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 05/21] turn info kqemu into generic info acceler


From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH 05/21] turn info kqemu into generic info accelerator
Date: Wed, 15 Oct 2008 15:25:20 -0500
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Glauber Costa wrote:
From: Glauber Costa <address@hidden>

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 <address@hidden>
---
 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().

Regards,

Anthony Liguori






reply via email to

[Prev in Thread] Current Thread [Next in Thread]