[libvirt] [PATCH v3 1/2] systemd: fix build without dbus

Michal Privoznik mprivozn at redhat.com
Fri Jan 23 08:50:42 UTC 2015


On 22.01.2015 17:51, Daniel P. Berrange wrote:
> The virDBusMethodCall method has a DBusError as one of its
> parameters. If the caller wants to pass a non-NULL value
> for this, it immediately makes the calling code require
> DBus at build time. This has led to breakage of non-DBus
> builds several times. It is desirable that only the virdbus.c
> file should need WITH_DBUS conditionals, so we must ideally
> remove the DBusError parameter from the method.
> 
> We can't simply raise a libvirt error, since the whole point
> of this parameter is to give the callers a way to check if
> the error is one they want to ignore, without having the logs
> polluted with an error message. So, we add a virErrorPtr
> parameter which the caller can then either ignore or raise
> using the new virReportErrorObject method.
> 
> This new method is distinct from virSetError in that it
> ensures the logging hooks are run.
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  po/POTFILES.in           |   1 -
>  src/libvirt_private.syms |   1 +
>  src/util/virdbus.c       |  31 ++++++++------
>  src/util/virdbus.h       |   4 +-
>  src/util/virerror.c      | 104 +++++++++++++++++++++++++++++++++++++----------
>  src/util/virerror.h      |   8 ++++
>  src/util/virfirewall.c   |  29 +++----------
>  src/util/virsystemd.c    |  15 ++++---
>  8 files changed, 125 insertions(+), 68 deletions(-)


ACK to both.

Michal




More information about the libvir-list mailing list