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@xxxxxxxxxx> > --- > 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 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list