qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC 15/48] error: Don't abuse qemu_error() for n


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH RFC 15/48] error: Don't abuse qemu_error() for non-error in qdev_device_help()
Date: Mon, 1 Mar 2010 13:11:15 -0300

On Mon, 01 Mar 2010 10:05:18 +0100
Markus Armbruster <address@hidden> wrote:

> Luiz Capitulino <address@hidden> writes:
> 
> > On Wed, 24 Feb 2010 18:55:27 +0100
> > Markus Armbruster <address@hidden> wrote:
> >
> >> qdev_device_help() prints device information with qemu_error().  A
> >> later commit will make qemu_error() print additional stuff that is
> >> only appropriate for proper errors, and then this will break.  Use
> >> error_printf() instead.
> >
> >  Aren't you abusing the error function just like the current code?
> 
> error_printf() isn't a function to report an error.  It's a function to
> print to the error destination, which is either the current monitor or
> stderr.  It serves as a building block for functions that report an
> error.

 Makes sense.

> > I think that this information should be printed to stdout.
> 
> Agree in principle.  Existing code is sloppy about stdout vs. stderr,
> however.  If it's important to start cleaning that up *now*, we could
> add functions to print to the "user destination", which is either the
> current monitor or stdout.
> 
> In any case, it needs to be a separate commit, because this commit
> should do just one thing: fix the qemu_error() abuse.  Proper use of
> stderr and stdout is a separate issue.

 Okay.




reply via email to

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