add-domain: Suppress libvirt errors on stderr.
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 6 May 2011 16:32:59 +0000 (12:32 -0400)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 6 May 2011 17:03:50 +0000 (13:03 -0400)
commita4c28b4ed1c5a102c8de2a7425568eb504d05c34
tree8455a3da5605401d8bf9eafc65264284dc139d0e
parentc49fc3831d12788c27b90d12f06a1cd69a88e3be
add-domain: Suppress libvirt errors on stderr.

Install an error handler on the libvirt error connection so that
errors are not printed on stderr (instead they go up through the usual
libguestfs error mechanism).

Unfortunately this doesn't suppress initial connection error messages
to stderr.  I cannot see how to do this without affecting the global
libvirt error handler, which is not acceptable for a library to be
doing.
src/virt.c