]> git.proxmox.com Git - qemu.git/commit
Monitor: Debug stray prints the right way
authorLuiz Capitulino <lcapitulino@redhat.com>
Thu, 11 Feb 2010 01:50:06 +0000 (23:50 -0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 19 Feb 2010 21:18:18 +0000 (15:18 -0600)
commit10e4f606ec5584ea20234d2e12b66a702f8b5956
treee8f408d2c1dcbe8f7981471781d73c6272544108
parentbb89c2e901b1a0c1cb6b94392cae1f98e6660ed7
Monitor: Debug stray prints the right way

QObject Monitor handlers should not call any Monitor print
function: they should only build objects, printing is done
by common code.

Current QMP code will ignore such calls, as we can't send
garbage to clients, additionally it will also emit an
undefined error on the assumption that print calls usually
report errors.

However, the right way to deal with this is to rely on a
return code. This has been fixed by other commit already.

Now, this commit drops the error from monitor_vprintf() and
adds a better debugging mechanism for those 'stray' prints:
we count them if debug is enabled and let the developer know
if a QObject handler is trying to print anything.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor.c