Am 07.02.2012 15:09, schrieb Markus Armbruster:
> Our chardev open error messages are an embarrassment.  Commit 6e1db57b
> tried to improve the useless "opening backend FOO failed" message in
> qemu_chr_open_opts(), but it is flawed: some failure modes went from
> an unhelpful "failed" to an outright misleading error message (see
> first patch for details).  And even for failure modes where the
> message isn't misleading, it's still sub-par.
> 
> Clue: many backends already report their errors.  The "failed" message
> is merely redundant then.
> 
> Since I'm touching the error reporting anyway, convert it to
> error_report(), so that a future a monitor command to add character
> devices emits its errors to the monitor, not stderr.
> 
> Outline:
> 
> [01-04/19] Revert the flawed commit
> [05-06/19] Prepare for use of error_report()
> [07-17/19] Make the backends report decent errors on all failure paths
> [   18/18] Rip out the useless "failed" message 
> [   19/19] Bonus fix: legacy chardev syntax error reporting

I had some minor comments which can be fixed on top. I also think that
introducing Error** to these functions can (or actually should) be a
separate step.

Reviewed-by: Kevin Wolf <kw...@redhat.com>

Reply via email to