[libvirt] [PATCH 0/5] Tiny miscellaneous clean-ups

Just a few things I stumbled upon that are needed for future work. Martin Kletzander (5): configure: Align messages Link libvirt_util with datatypes closeCallback is already lockable, initialize it as such Change virConnectPtr into virObjectLocklable json: export non-static functions configure.ac | 4 ++-- src/Makefile.am | 7 ++++--- src/datatypes.c | 16 ++++------------ src/datatypes.h | 12 +++++------- src/libvirt-host.c | 18 +++++++++--------- src/libvirt_private.syms | 2 ++ src/util/virerror.c | 18 +++++++++--------- 7 files changed, 35 insertions(+), 42 deletions(-) -- 2.3.5

The first two were a bit off. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 38fbbad..aed0934 100644 --- a/configure.ac +++ b/configure.ac @@ -2966,8 +2966,8 @@ AC_MSG_NOTICE([pm-utils: $with_pm_utils]) AC_MSG_NOTICE([]) AC_MSG_NOTICE([Test suite]) AC_MSG_NOTICE([]) -AC_MSG_NOTICE([ Coverage: $enable_coverage]) -AC_MSG_NOTICE([ Alloc OOM: $enable_oom]) +AC_MSG_NOTICE([ Coverage: $enable_coverage]) +AC_MSG_NOTICE([ Alloc OOM: $enable_oom]) AC_MSG_NOTICE([]) AC_MSG_NOTICE([Miscellaneous]) AC_MSG_NOTICE([]) -- 2.3.5

On Mon, Apr 13, 2015 at 16:33:48 +0200, Martin Kletzander wrote:
The first two were a bit off.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ACK, Peter

We were lucky enough for this to work because the datatypes files were linked to in the resulting binary, but the dependency really is already in libvirt_util. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/Makefile.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 91a4c17..8c26076 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -## Copyright (C) 2005-2014 Red Hat, Inc. +## Copyright (C) 2005-2015 Red Hat, Inc. ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public @@ -86,9 +86,12 @@ augeas_DATA = augeastestdir = $(datadir)/augeas/lenses/tests augeastest_DATA = +DATATYPES_SOURCES = datatypes.h datatypes.c + # These files are not related to driver APIs. Simply generic # helper APIs for various purposes UTIL_SOURCES = \ + $(DATATYPES_SOURCES) \ util/viralloc.c util/viralloc.h \ util/virarch.h util/virarch.c \ util/viratomic.h util/viratomic.c \ @@ -185,7 +188,6 @@ util/virkeymaps.h: $(srcdir)/util/keymaps.csv \ # Internal generic driver infrastructure NODE_INFO_SOURCES = nodeinfo.h nodeinfo.c nodeinfopriv.h -DATATYPES_SOURCES = datatypes.h datatypes.c DRIVER_SOURCES = \ driver.c driver.h \ driver-hypervisor.h \ @@ -198,7 +200,6 @@ DRIVER_SOURCES = \ driver-storage.h \ driver-stream.h \ internal.h \ - $(DATATYPES_SOURCES) \ fdstream.c fdstream.h \ $(NODE_INFO_SOURCES) \ libvirt.c libvirt_internal.h \ -- 2.3.5

On Mon, Apr 13, 2015 at 16:33:49 +0200, Martin Kletzander wrote:
We were lucky enough for this to work because the datatypes files were linked to in the resulting binary, but the dependency really is already in libvirt_util.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/Makefile.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index 91a4c17..8c26076 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in
-## Copyright (C) 2005-2014 Red Hat, Inc. +## Copyright (C) 2005-2015 Red Hat, Inc. ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public @@ -86,9 +86,12 @@ augeas_DATA = augeastestdir = $(datadir)/augeas/lenses/tests augeastest_DATA =
+DATATYPES_SOURCES = datatypes.h datatypes.c + # These files are not related to driver APIs. Simply generic # helper APIs for various purposes UTIL_SOURCES = \ + $(DATATYPES_SOURCES) \ util/viralloc.c util/viralloc.h \ util/virarch.h util/virarch.c \ util/viratomic.h util/viratomic.c \
I think this makes it wrong the other way. While they are used in the utils they definitely are not just 'utils'. The source file contains definitions and declarations for the public data types and that definitely is not "just utils". Btw, read the comment right above the UTIL_SOURCES line ... The real problem here is that 'util' uses types from the datatypes file. Do you know of any examples that make utils depend on datatypes.h? Peter

On Wed, Apr 15, 2015 at 09:26:45AM +0200, Peter Krempa wrote:
On Mon, Apr 13, 2015 at 16:33:49 +0200, Martin Kletzander wrote:
We were lucky enough for this to work because the datatypes files were linked to in the resulting binary, but the dependency really is already in libvirt_util.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/Makefile.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index 91a4c17..8c26076 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in
-## Copyright (C) 2005-2014 Red Hat, Inc. +## Copyright (C) 2005-2015 Red Hat, Inc. ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public @@ -86,9 +86,12 @@ augeas_DATA = augeastestdir = $(datadir)/augeas/lenses/tests augeastest_DATA =
+DATATYPES_SOURCES = datatypes.h datatypes.c + # These files are not related to driver APIs. Simply generic # helper APIs for various purposes UTIL_SOURCES = \ + $(DATATYPES_SOURCES) \ util/viralloc.c util/viralloc.h \ util/virarch.h util/virarch.c \ util/viratomic.h util/viratomic.c \
I think this makes it wrong the other way. While they are used in the utils they definitely are not just 'utils'. The source file contains definitions and declarations for the public data types and that definitely is not "just utils". Btw, read the comment right above the UTIL_SOURCES line ...
The real problem here is that 'util' uses types from the datatypes file.
Do you know of any examples that make utils depend on datatypes.h?
No, but the other way around. most of the types in datatypes are virObjects defined in util/virobject.c, so everything that has DATATYPES_SOURCES must be linked with UTIL_SOURCES as well. The right way to put this together would be DATATYPES_SOURCES += UTIL_SOURCES, but that's downright ugly to fix. Moreover everything that links with UTIL_SOURCES. I should've probably squashed in the following patch. diff --git i/src/Makefile.am w/src/Makefile.am index 8c26076..84f489f 100644 --- i/src/Makefile.am +++ w/src/Makefile.am @@ -672,10 +672,6 @@ LXC_CONTROLLER_SOURCES = \ lxc/lxc_fuse.c lxc/lxc_fuse.h \ lxc/lxc_controller.c -SECURITY_DRIVER_APPARMOR_HELPER_SOURCES = \ - $(DATATYPES_SOURCES) \ - security/virt-aa-helper.c - PHYP_DRIVER_SOURCES = \ phyp/phyp_driver.c phyp/phyp_driver.h @@ -2605,8 +2601,7 @@ libexec_PROGRAMS += libvirt_lxc libvirt_lxc_SOURCES = \ $(LXC_CONTROLLER_SOURCES) \ - $(NODE_INFO_SOURCES) \ - $(DATATYPES_SOURCES) + $(NODE_INFO_SOURCES) libvirt_lxc_LDFLAGS = \ $(AM_LDFLAGS) \ $(PIE_LDFLAGS) \ @@ -2644,7 +2639,7 @@ if WITH_SECDRIVER_APPARMOR if WITH_LIBVIRTD libexec_PROGRAMS += virt-aa-helper -virt_aa_helper_SOURCES = $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES) +virt_aa_helper_SOURCES = security/virt-aa-helper.c virt_aa_helper_LDFLAGS = \ $(AM_LDFLAGS) \ @@ -2667,7 +2662,7 @@ virt_aa_helper_CFLAGS = \ $(NULL) endif WITH_LIBVIRTD endif WITH_SECDRIVER_APPARMOR -EXTRA_DIST += $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES) +EXTRA_DIST += security/virt-aa-helper.c install-data-local: install-init install-systemd if WITH_LIBVIRTD --

Luckily we are allocating structs as clean memory and PTHREAD_MUTEX_INITIALIZER is "{ 0 }", so nothing happened, but it should still be created as lockable object. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/datatypes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/datatypes.c b/src/datatypes.c index 0f535b4..dc024f8 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -1,7 +1,7 @@ /* * datatypes.c: management of structs for public data types * - * Copyright (C) 2006-2014 Red Hat, Inc. + * Copyright (C) 2006-2015 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -113,7 +113,7 @@ virGetConnect(void) if (!(ret = virObjectNew(virConnectClass))) return NULL; - if (!(ret->closeCallback = virObjectNew(virConnectCloseCallbackDataClass))) + if (!(ret->closeCallback = virObjectLockableNew(virConnectCloseCallbackDataClass))) goto error; if (virMutexInit(&ret->lock) < 0) -- 2.3.5

On Mon, Apr 13, 2015 at 16:33:50 +0200, Martin Kletzander wrote:
Luckily we are allocating structs as clean memory and PTHREAD_MUTEX_INITIALIZER is "{ 0 }", so nothing happened, but it should still be created as lockable object.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/datatypes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/datatypes.c b/src/datatypes.c index 0f535b4..dc024f8 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -1,7 +1,7 @@ /* * datatypes.c: management of structs for public data types * - * Copyright (C) 2006-2014 Red Hat, Inc. + * Copyright (C) 2006-2015 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public
In patches like this, the emacs year bumper script makes it twice the size.
@@ -113,7 +113,7 @@ virGetConnect(void) if (!(ret = virObjectNew(virConnectClass))) return NULL;
- if (!(ret->closeCallback = virObjectNew(virConnectCloseCallbackDataClass))) + if (!(ret->closeCallback = virObjectLockableNew(virConnectCloseCallbackDataClass))) goto error;
if (virMutexInit(&ret->lock) < 0)
ACK, Peter

On Wed, Apr 15, 2015 at 09:29:39AM +0200, Peter Krempa wrote:
On Mon, Apr 13, 2015 at 16:33:50 +0200, Martin Kletzander wrote:
Luckily we are allocating structs as clean memory and PTHREAD_MUTEX_INITIALIZER is "{ 0 }", so nothing happened, but it should still be created as lockable object.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/datatypes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/datatypes.c b/src/datatypes.c index 0f535b4..dc024f8 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -1,7 +1,7 @@ /* * datatypes.c: management of structs for public data types * - * Copyright (C) 2006-2014 Red Hat, Inc. + * Copyright (C) 2006-2015 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public
In patches like this, the emacs year bumper script makes it twice the size.
But only once a year and we're hyper-compliant after that ;)
@@ -113,7 +113,7 @@ virGetConnect(void) if (!(ret = virObjectNew(virConnectClass))) return NULL;
- if (!(ret->closeCallback = virObjectNew(virConnectCloseCallbackDataClass))) + if (!(ret->closeCallback = virObjectLockableNew(virConnectCloseCallbackDataClass))) goto error;
if (virMutexInit(&ret->lock) < 0)
ACK,
Peter

It already had a virMutex inside, so this is just a cleanup. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/datatypes.c | 12 ++---------- src/datatypes.h | 12 +++++------- src/libvirt-host.c | 18 +++++++++--------- src/util/virerror.c | 18 +++++++++--------- 4 files changed, 25 insertions(+), 35 deletions(-) diff --git a/src/datatypes.c b/src/datatypes.c index dc024f8..39f83d9 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -73,7 +73,7 @@ virDataTypesOnceInit(void) #define DECLARE_CLASS_LOCKABLE(basename) \ DECLARE_CLASS_COMMON(basename, virClassForObjectLockable()) - DECLARE_CLASS(virConnect); + DECLARE_CLASS_LOCKABLE(virConnect); DECLARE_CLASS_LOCKABLE(virConnectCloseCallbackData); DECLARE_CLASS(virDomain); DECLARE_CLASS(virDomainSnapshot); @@ -110,15 +110,12 @@ virGetConnect(void) if (virDataTypesInitialize() < 0) return NULL; - if (!(ret = virObjectNew(virConnectClass))) + if (!(ret = virObjectLockableNew(virConnectClass))) return NULL; if (!(ret->closeCallback = virObjectLockableNew(virConnectCloseCallbackDataClass))) goto error; - if (virMutexInit(&ret->lock) < 0) - goto error; - return ret; error: @@ -141,8 +138,6 @@ virConnectDispose(void *obj) if (conn->driver) conn->driver->connectClose(conn); - virMutexLock(&conn->lock); - virResetError(&conn->err); virURIFree(conn->uri); @@ -154,9 +149,6 @@ virConnectDispose(void *obj) virObjectUnref(conn->closeCallback); } - - virMutexUnlock(&conn->lock); - virMutexDestroy(&conn->lock); } diff --git a/src/datatypes.h b/src/datatypes.h index 4973b07..9e19c55 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -1,7 +1,7 @@ /* * datatypes.h: management of structs for public data types * - * Copyright (C) 2006-2014 Red Hat, Inc. + * Copyright (C) 2006-2015 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -328,7 +328,7 @@ struct _virConnectCloseCallbackData { * Internal structure associated to a connection */ struct _virConnect { - virObject object; + virObjectLockable object; /* All the variables from here, until the 'lock' declaration * are setup at time of connection open, and never changed * since. Thus no need to lock when accessing them @@ -352,12 +352,10 @@ struct _virConnect { void * privateData; /* - * The lock mutex must be acquired before accessing/changing - * any of members following this point, or changing the ref - * count of any virDomain/virNetwork object associated with - * this connection + * Object lock must be acquired before accessing/changing any of + * members following this point, or changing the ref count of any + * virDomain/virNetwork object associated with this connection. */ - virMutex lock; /* Per-connection error. */ virError err; /* the last error */ diff --git a/src/libvirt-host.c b/src/libvirt-host.c index b4dc13e..03bee1f 100644 --- a/src/libvirt-host.c +++ b/src/libvirt-host.c @@ -1,7 +1,7 @@ /* * libvirt-host.c: entry points for vir{Connect,Node}Ptr APIs * - * Copyright (C) 2006-2014 Red Hat, Inc. + * Copyright (C) 2006-2015 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -51,7 +51,7 @@ VIR_LOG_INIT("libvirt.host"); int virConnectRef(virConnectPtr conn) { - VIR_DEBUG("conn=%p refs=%d", conn, conn ? conn->object.u.s.refs : 0); + VIR_DEBUG("conn=%p refs=%d", conn, conn ? conn->object.parent.u.s.refs : 0); virResetLastError(); @@ -1219,7 +1219,7 @@ virConnectRegisterCloseCallback(virConnectPtr conn, virObjectRef(conn); - virMutexLock(&conn->lock); + virObjectLock(conn); virObjectLock(conn->closeCallback); virCheckNonNullArgGoto(cb, error); @@ -1236,13 +1236,13 @@ virConnectRegisterCloseCallback(virConnectPtr conn, conn->closeCallback->freeCallback = freecb; virObjectUnlock(conn->closeCallback); - virMutexUnlock(&conn->lock); + virObjectUnlock(conn); return 0; error: virObjectUnlock(conn->closeCallback); - virMutexUnlock(&conn->lock); + virObjectUnlock(conn); virDispatchError(conn); virObjectUnref(conn); return -1; @@ -1272,7 +1272,7 @@ virConnectUnregisterCloseCallback(virConnectPtr conn, virCheckConnectReturn(conn, -1); - virMutexLock(&conn->lock); + virObjectLock(conn); virObjectLock(conn->closeCallback); virCheckNonNullArgGoto(cb, error); @@ -1288,15 +1288,15 @@ virConnectUnregisterCloseCallback(virConnectPtr conn, conn->closeCallback->freeCallback(conn->closeCallback->opaque); conn->closeCallback->freeCallback = NULL; - virObjectUnref(conn); virObjectUnlock(conn->closeCallback); - virMutexUnlock(&conn->lock); + virObjectUnlock(conn); + virObjectUnref(conn); return 0; error: virObjectUnlock(conn->closeCallback); - virMutexUnlock(&conn->lock); + virObjectUnlock(conn); virDispatchError(conn); return -1; } diff --git a/src/util/virerror.c b/src/util/virerror.c index c4e84e7..942fe35 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -1,7 +1,7 @@ /* * virerror.c: error handling and reporting code for libvirt * - * Copyright (C) 2006, 2008-2014 Red Hat, Inc. + * Copyright (C) 2006, 2008-2015 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -460,12 +460,12 @@ virConnCopyLastError(virConnectPtr conn, virErrorPtr to) if (conn == NULL) return -1; - virMutexLock(&conn->lock); + virObjectLock(conn); if (conn->err.code == VIR_ERR_OK) virResetError(to); else virCopyError(&conn->err, to); - virMutexUnlock(&conn->lock); + virObjectUnlock(conn); return to->code; } @@ -483,9 +483,9 @@ virConnResetLastError(virConnectPtr conn) { if (conn == NULL) return; - virMutexLock(&conn->lock); + virObjectLock(conn); virResetError(&conn->err); - virMutexUnlock(&conn->lock); + virObjectUnlock(conn); } /** @@ -520,10 +520,10 @@ virConnSetErrorFunc(virConnectPtr conn, void *userData, { if (conn == NULL) return; - virMutexLock(&conn->lock); + virObjectLock(conn); conn->handler = handler; conn->userData = userData; - virMutexUnlock(&conn->lock); + virObjectUnlock(conn); } /** @@ -600,14 +600,14 @@ virDispatchError(virConnectPtr conn) /* Copy the global error to per-connection error if needed */ if (conn) { - virMutexLock(&conn->lock); + virObjectLock(conn); virCopyError(err, &conn->err); if (conn->handler != NULL) { handler = conn->handler; userData = conn->userData; } - virMutexUnlock(&conn->lock); + virObjectUnlock(conn); } /* Invoke the error callback functions */ -- 2.3.5

On Mon, Apr 13, 2015 at 16:33:51 +0200, Martin Kletzander wrote:
It already had a virMutex inside, so this is just a cleanup.
It also probably fixes a potential deadlock too.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/datatypes.c | 12 ++---------- src/datatypes.h | 12 +++++------- src/libvirt-host.c | 18 +++++++++--------- src/util/virerror.c | 18 +++++++++--------- 4 files changed, 25 insertions(+), 35 deletions(-)
...
diff --git a/src/datatypes.h b/src/datatypes.h index 4973b07..9e19c55 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -1,7 +1,7 @@ /* * datatypes.h: management of structs for public data types * - * Copyright (C) 2006-2014 Red Hat, Inc. + * Copyright (C) 2006-2015 Red Hat, Inc.
Yay, it's 2015 already? We are going to get hoverboards this year!
* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -328,7 +328,7 @@ struct _virConnectCloseCallbackData { * Internal structure associated to a connection */ struct _virConnect { - virObject object; + virObjectLockable object; /* All the variables from here, until the 'lock' declaration * are setup at time of connection open, and never changed * since. Thus no need to lock when accessing them
The lock delcaration is no longer here, so you should mention the comment you've changed below.
@@ -352,12 +352,10 @@ struct _virConnect { void * privateData;
/* - * The lock mutex must be acquired before accessing/changing - * any of members following this point, or changing the ref - * count of any virDomain/virNetwork object associated with - * this connection + * Object lock must be acquired before accessing/changing any of + * members following this point, or changing the ref count of any + * virDomain/virNetwork object associated with this connection. */ - virMutex lock;
/* Per-connection error. */ virError err; /* the last error */
...
diff --git a/src/libvirt-host.c b/src/libvirt-host.c index b4dc13e..03bee1f 100644 --- a/src/libvirt-host.c +++ b/src/libvirt-host.c
...
@@ -1288,15 +1288,15 @@ virConnectUnregisterCloseCallback(virConnectPtr conn, conn->closeCallback->freeCallback(conn->closeCallback->opaque); conn->closeCallback->freeCallback = NULL;
- virObjectUnref(conn); virObjectUnlock(conn->closeCallback); - virMutexUnlock(&conn->lock); + virObjectUnlock(conn); + virObjectUnref(conn);
So this is the only semantic change in this patch. I'm surprised it didn't bite us at some point actually, since the connection dispose code is/was locking conn->lock. Perhaps it didn't ever order in the wrong way.
return 0;
error: virObjectUnlock(conn->closeCallback); - virMutexUnlock(&conn->lock); + virObjectUnlock(conn); virDispatchError(conn); return -1; }
ACK with the comment updated. Peter

Two non-static functions in virjson.c were missing their export info in libvirt_private.syms, so they couldn't be used anywhere it the code (and that's about to get changed). Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/libvirt_private.syms | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 67ab526..d9497b5 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1569,6 +1569,7 @@ virISCSIScanTargets; virJSONValueArrayAppend; virJSONValueArrayGet; virJSONValueArraySize; +virJSONValueArraySteal; virJSONValueFree; virJSONValueFromString; virJSONValueGetArrayAsBitmap; @@ -1579,6 +1580,7 @@ virJSONValueGetNumberLong; virJSONValueGetNumberUint; virJSONValueGetNumberUlong; virJSONValueGetString; +virJSONValueIsArray; virJSONValueIsNull; virJSONValueNewArray; virJSONValueNewArrayFromBitmap; -- 2.3.5

On Mon, Apr 13, 2015 at 16:33:52 +0200, Martin Kletzander wrote:
Two non-static functions in virjson.c were missing their export info in libvirt_private.syms, so they couldn't be used anywhere it the code (and that's about to get changed).
They both are used in the libvirt_leaseshelper program. But they are linked in explicitly.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- src/libvirt_private.syms | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 67ab526..d9497b5 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1569,6 +1569,7 @@ virISCSIScanTargets; virJSONValueArrayAppend; virJSONValueArrayGet; virJSONValueArraySize; +virJSONValueArraySteal; virJSONValueFree; virJSONValueFromString; virJSONValueGetArrayAsBitmap; @@ -1579,6 +1580,7 @@ virJSONValueGetNumberLong; virJSONValueGetNumberUint; virJSONValueGetNumberUlong; virJSONValueGetString; +virJSONValueIsArray; virJSONValueIsNull; virJSONValueNewArray; virJSONValueNewArrayFromBitmap;
ACK, Peter
participants (2)
-
Martin Kletzander
-
Peter Krempa