Re: [PATCH v2] Pull DBus event code out into common area

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/12/2012 02:07 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]