[libvirt] [PATCH v2] Pull DBus event code out into common area
Eric Blake
eblake at redhat.com
Thu Apr 12 23:34:54 UTC 2012
On 04/12/2012 02:07 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> The policy kit and HAL node device drivers both require a
> DBus connection. The HAL device code further requires that
> the DBus connection is integrated with the event loop and
> provides such glue logic itself.
>
> The forthcoming FirewallD integration also requires a
> dbus connection with event loop integration. Thus we need
> to pull the current event loop glue out of the HAL driver.
>
> Thus we create src/util/virdbus.{c,h} files. This contains
> just one method virDBusGetSystemBus() which obtains a handle
> to the single shared system bus instance, with event glue
> automagically setup.
> ---
> .gitignore | 6 +-
> configure.ac | 37 ++++++-
> daemon/Makefile.am | 3 +-
> daemon/libvirtd.c | 4 -
> daemon/remote.c | 8 +-
> include/libvirt/virterror.h | 1 +
> src/Makefile.am | 13 +--
> src/libvirt_dbus.syms | 2 -
You're dropping libvirt_dbus.syms, but I don't see where you are
modifying libvirt_private.syms to make up for it.
> src/node_device/node_device_hal.c | 143 ++------------------------
> src/rpc/virnetserver.c | 40 --------
> src/rpc/virnetserver.h | 8 --
> src/util/virdbus.c | 201 +++++++++++++++++++++++++++++++++++++
> src/util/virdbus.h | 34 ++++++
> src/util/virterror.c | 3 +
> 14 files changed, 296 insertions(+), 207 deletions(-)
> delete mode 100644 src/libvirt_dbus.syms
> create mode 100644 src/util/virdbus.c
> create mode 100644 src/util/virdbus.h
> +#ifndef __VIR_DBUS_H__
> +# define __VIR_DBUS_H__
> +
> +# ifdef HAVE_DBUS
> +# include <dbus/dbus.h>
> +# else
> +# define DBusConnection void
Is typedef any better than #define here? But this works.
ACK with .syms nit fixed.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120412/0b3e4046/attachment-0001.sig>
More information about the libvir-list
mailing list