Luiz Capitulino <lcapitul...@redhat.com> writes: > On Wed, 24 Feb 2010 18:55:27 +0100 > Markus Armbruster <arm...@redhat.com> 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.