qemu-devel
[Top][All Lists]
Advanced

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

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


From: M. Warner Losh
Subject: Re: [Qemu-devel] Re: [PATCH 05/21] turn info kqemu into generic info accelerator
Date: Wed, 15 Oct 2008 15:23:17 -0600 (MDT)

In message: <address@hidden>
            Anthony Liguori <address@hidden> writes:
: 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().

why use sprintf for this?

Warner




reply via email to

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