[Top][All Lists]
[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: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH RFC 15/48] error: Don't abuse qemu_error() for non-error in qdev_device_help() |
Date: |
Mon, 01 Mar 2010 10:05:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
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.
> Also,
> 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.
- Re: [Qemu-devel] [PATCH RFC 15/48] error: Don't abuse qemu_error() for non-error in qdev_device_help(),
Markus Armbruster <=