[libvirt] [PATCHv3 1/3] virdbus: Add virDBusHasSystemBus()

Eric Blake eblake at redhat.com
Mon Aug 19 13:19:31 UTC 2013


On 08/19/2013 06:58 AM, Peter Krempa wrote:
> Some systems may not use DBus in their system. Add a method to check if
> the system bus is available that doesn't print error messages so that
> code can later check for this condition and use an alternative approach.
> ---
>  src/libvirt_private.syms |  1 +
>  src/util/virdbus.c       | 33 ++++++++++++++++++++++++++++++---
>  src/util/virdbus.h       |  1 +
>  3 files changed, 32 insertions(+), 3 deletions(-)

> +++ b/src/util/virdbus.c
> @@ -73,7 +73,8 @@ static void virDBusSystemBusInit(void)
>      systembus = virDBusBusInit(DBUS_BUS_SYSTEM, &systemdbuserr);
>  }
> 
> -DBusConnection *virDBusGetSystemBus(void)
> +static DBusConnection
> +*virDBusGetSystemBusInternal(void)

Wrapped incorrectly.  Should be

static DBusConnection *
virDBusGetSystemBusInternal(void)

(The * is part of the return type, not part of the function name.)

> +
> +
> +bool virDBusHasSystemBus(void)

Odd to see wrapped and non-wrapped in the same patch.

bool
virDBusHasSystemBus(void)

-- 
Eric Blake   eblake 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: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130819/94861185/attachment-0001.sig>


More information about the libvir-list mailing list