[libvirt] [PATCH] ServerClient: Flush SASL data
by Michal Privoznik
If daemon is using SASL it reads client data into a cache. This cache is
big (usually 65KB) and can thus contain 2 or more messages. However,
on socket event we can dispatch only one message. So if we read two
messages at once, the second will not be dispatched as the socket event
goes away with filling the cache.
Moreover, when dispatching the cache we need to remember to take care
of client max requests limit.
---
src/rpc/virnetserverclient.c | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index 1256f0f..69af746 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -71,6 +71,8 @@ struct _virNetServerClient
virNetTLSSessionPtr tls;
#if HAVE_SASL
virNetSASLSessionPtr sasl;
+ int sasl_timer; /* Timer to be fired upon cached data,
+ so we jump out from poll() immediately */
#endif
/* Count of messages in the 'tx' queue,
@@ -103,6 +105,7 @@ struct _virNetServerClient
static void virNetServerClientDispatchEvent(virNetSocketPtr sock, int events, void *opaque);
static void virNetServerClientUpdateEvent(virNetServerClientPtr client);
+static void virNetServerClientDispatchRead(virNetServerClientPtr client);
static void virNetServerClientLock(virNetServerClientPtr client)
{
@@ -191,6 +194,19 @@ static int virNetServerClientRegisterEvent(virNetServerClientPtr client)
return 0;
}
+static void virNetServerClientDispatchReadTimerFunc(int timer,
+ void *opaque)
+{
+ virNetServerClientPtr client = opaque;
+ virNetServerClientLock(client);
+ virEventUpdateTimeout(timer, -1);
+ /* Even if this timer is enabled iff client->rx != NULL,
+ * but meanwhile client was unlocked, so it might have changed */
+ if (client->rx)
+ virNetServerClientDispatchRead(client);
+ virNetServerClientUnlock(client);
+}
+
/*
* @client: a locked client object
*/
@@ -204,6 +220,19 @@ static void virNetServerClientUpdateEvent(virNetServerClientPtr client)
mode = virNetServerClientCalculateHandleMode(client);
virNetSocketUpdateIOCallback(client->sock, mode);
+#ifdef HAVE_SASL
+ if (client->nrequests < client->nrequests_max &&
+ client->rx &&
+ virNetSocketHasCachedData(client->sock)) {
+ if (client->sasl_timer)
+ virEventUpdateTimeout(client->sasl_timer, 0);
+ else
+ client->sasl_timer = virEventAddTimeout(0,
+ virNetServerClientDispatchReadTimerFunc,
+ client,
+ NULL);
+ }
+#endif
}
@@ -556,6 +585,8 @@ void virNetServerClientFree(virNetServerClientPtr client)
VIR_FREE(client->identity);
#if HAVE_SASL
virNetSASLSessionFree(client->sasl);
+ if (client->sasl_timer)
+ virEventRemoveTimeout(client->sasl_timer);
#endif
virNetTLSSessionFree(client->tls);
virNetTLSContextFree(client->tlsCtxt);
@@ -990,7 +1021,8 @@ virNetServerClientDispatchEvent(virNetSocketPtr sock, int events, void *opaque)
} else {
if (events & VIR_EVENT_HANDLE_WRITABLE)
virNetServerClientDispatchWrite(client);
- if (events & VIR_EVENT_HANDLE_READABLE)
+ if (events & VIR_EVENT_HANDLE_READABLE &&
+ client->rx)
virNetServerClientDispatchRead(client);
}
}
--
1.7.3.4
13 years
[libvirt] [PATCH] Workaround for broken kernel autofs mounts
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The kernel automounter is mostly broken wrt to containers. Most
notably if you start a new filesystem namespace and then attempt
to unmount any autofs filesystem, it will typically fail with a
wierd error message like
Failed to unmount '/.oldroot/sys/kernel/security':Too many levels of symbolic links
Atttempting to detach the autofs mount mount using umount2(MNT_DETACH)
will also fail with the same error. Therefore if we get any error on
unmount()ing a filesystem from the old root FS when starting a
container, we must immediately break out and detach the entire
old root filesystem (ignoring any mounts below it).
This has the effect of making the old root filesystem inaccessible
to anything inside the container, but at the cost that the mounts
live on in the kernel until the container exits. Given that SystemD
uses autofs by default, we need LXC to be robust this scenario and
thus this tradeoff is worthwhile.
* src/lxc/lxc_container.c: Detach root filesystem if any umount
operation fails.
---
src/lxc/lxc_container.c | 49 ++++++++++++++++++++++++++++++++++++----------
1 files changed, 38 insertions(+), 11 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 63284e5..fbd5267 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -860,6 +860,9 @@ static int lxcContainerUnmountOldFS(void)
FILE *procmnt;
int i;
char mntbuf[1024];
+ int saveErrno;
+ const char *failedUmount = NULL;
+ int ret = -1;
if (!(procmnt = setmntent("/proc/mounts", "r"))) {
virReportSystemError(errno, "%s",
@@ -872,17 +875,15 @@ static int lxcContainerUnmountOldFS(void)
continue;
if (VIR_REALLOC_N(mounts, nmounts+1) < 0) {
- endmntent(procmnt);
virReportOOMError();
- return -1;
+ goto cleanup;
}
if (!(mounts[nmounts++] = strdup(mntent.mnt_dir))) {
- endmntent(procmnt);
virReportOOMError();
- return -1;
+ goto cleanup;
}
+ VIR_DEBUG("Grabbed %s", mntent.mnt_dir);
}
- endmntent(procmnt);
if (mounts)
qsort(mounts, nmounts, sizeof(mounts[0]),
@@ -891,16 +892,42 @@ static int lxcContainerUnmountOldFS(void)
for (i = 0 ; i < nmounts ; i++) {
VIR_DEBUG("Umount %s", mounts[i]);
if (umount(mounts[i]) < 0) {
- virReportSystemError(errno,
- _("Failed to unmount '%s'"),
- mounts[i]);
- return -1;
+ char ebuf[1024];
+ failedUmount = mounts[i];
+ saveErrno = errno;
+ VIR_WARN(_("Failed to unmount '%s', trying to detach root '%s': %s"),
+ failedUmount, mounts[nmounts-1],
+ virStrerror(errno, ebuf, sizeof(ebuf)));
+ break;
}
- VIR_FREE(mounts[i]);
}
+
+ if (failedUmount) {
+ /* This detaches the old root filesystem */
+ if (umount2(mounts[nmounts-1], MNT_DETACH) < 0) {
+ virReportSystemError(saveErrno,
+ _("Failed to unmount '%s' and could not detach old root '%s'"),
+ failedUmount, mounts[nmounts-1]);
+ goto cleanup;
+ }
+ /* This unmounts the tmpfs on which the old root filesystem was hosted */
+ if (umount(mounts[nmounts-1]) < 0) {
+ virReportSystemError(saveErrno,
+ _("Failed to unmount '%s' and could not unmount old root '%s'"),
+ failedUmount, mounts[nmounts-1]);
+ goto cleanup;
+ }
+ }
+
+ ret = 0;
+
+cleanup:
+ for (i = 0 ; i < nmounts ; i++)
+ VIR_FREE(mounts[i]);
+ endmntent(procmnt);
VIR_FREE(mounts);
- return 0;
+ return ret;
}
--
1.7.6.4
13 years
[libvirt] [PATCH 1/3] Create /var/lib/libvirt/filesystems for LXC trees
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
We already have a /var/lib/libvirt/images for OS install images.
We need a separate /var/lib/libvirt/filesystems for OS install
trees, since SELinux labelling will be different
* libvirt.spec.in: Add /var/lib/libvirt/filesystems
* src/Makefile.am: Create /var/lib/libvirt/filesystems
---
libvirt.spec.in | 1 +
src/Makefile.am | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 262cfed..261f34c 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1001,6 +1001,7 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
%dir %{_localstatedir}/run/libvirt/
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
+%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
%dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/
diff --git a/src/Makefile.am b/src/Makefile.am
index 5cbe1ac..c36664b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1522,6 +1522,7 @@ EXTRA_DIST += $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES)
install-data-local:
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/images"
+ $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/boot"
if HAVE_SANLOCK
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock"
@@ -1567,6 +1568,7 @@ endif
uninstall-local::
rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt" ||:
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/images" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems" ||:
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/boot" ||:
if HAVE_SANLOCK
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock" ||:
--
1.7.6.4
13 years
[libvirt] Coverity automatic detection
by Alex Jia
This email is automatically generated.
The test result is based on the following git commit:
c85013b Fix storage pool source comparison to avoid comparing with self
Analysis summary report:
------------------------
Files analyzed : 232
Total LoC input to cov-analyze : 326003
Functions analyzed : 7884
Paths analyzed : 892728
New defects found : 45 Total
7 ATOMICITY
2 DEADCODE
7 FORWARD_NULL
13 LOCK
2 NEGATIVE_RETURNS
1 NULL_RETURNS
1 RETURN_LOCAL
12 REVERSE_INULL
Exceeded path limit of 5000 paths in 0.13% of functions (normally up to 5% of functions encounter this limitation)
For details, please see attachment.
Regards,
Alex
13 years
[libvirt] [PATCH] Fix storage pool source comparison to avoid comparing with self
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
If we are comparing storage pools we must skip comparing with
ourself, so that re-defining an existing pool works
* conf/storage_conf.c: Skip self when comparing
---
src/conf/storage_conf.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index e893b2d..eb39198 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -1730,6 +1730,10 @@ int virStoragePoolSourceFindDuplicate(virStoragePoolObjListPtr pools,
if (def->type != pool->def->type)
continue;
+ /* Don't mach against ourself if re-defining existing pool ! */
+ if (STREQ(pool->def->name, def->name))
+ continue;
+
virStoragePoolObjLock(pool);
switch (pool->def->type) {
--
1.7.6.4
13 years
[libvirt] [libvirt-glib] Generate docs
by Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
This patch adds gtk-doc-based documentation. The generated docs aren't
very complete (or even correct) but this is a good start.
---
Makefile.am | 2 +-
configure.ac | 6 +
docs/Makefile.am | 1 +
docs/libvirt-gconfig/Libvirt-gconfig-docs.xml | 36 +++
docs/libvirt-gconfig/Libvirt-gconfig-sections.txt | 166 +++++++++++++
docs/libvirt-gconfig/Makefile.am | 44 ++++
docs/libvirt-glib/Libvirt-glib-docs.xml | 28 +++
docs/libvirt-glib/Libvirt-glib-sections.txt | 22 ++
docs/libvirt-glib/Makefile.am | 44 ++++
docs/libvirt-gobject/Libvirt-gobject-docs.xml | 37 +++
docs/libvirt-gobject/Libvirt-gobject-sections.txt | 244 ++++++++++++++++++++
docs/libvirt-gobject/Makefile.am | 44 ++++
gtk-doc.make | 256 +++++++++++++++++++++
13 files changed, 929 insertions(+), 1 deletions(-)
create mode 100644 docs/Makefile.am
create mode 100644 docs/libvirt-gconfig/Libvirt-gconfig-docs.xml
create mode 100644 docs/libvirt-gconfig/Libvirt-gconfig-sections.txt
create mode 100644 docs/libvirt-gconfig/Makefile.am
create mode 100644 docs/libvirt-glib/Libvirt-glib-docs.xml
create mode 100644 docs/libvirt-glib/Libvirt-glib-overrides.txt
create mode 100644 docs/libvirt-glib/Libvirt-glib-sections.txt
create mode 100644 docs/libvirt-glib/Libvirt-glib.types
create mode 100644 docs/libvirt-glib/Makefile.am
create mode 100644 docs/libvirt-gobject/Libvirt-gobject-docs.xml
create mode 100644 docs/libvirt-gobject/Libvirt-gobject-sections.txt
create mode 100644 docs/libvirt-gobject/Makefile.am
create mode 100644 gtk-doc.make
diff --git a/Makefile.am b/Makefile.am
index 8d082c0..cecffd6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
-SUBDIRS = libvirt-glib libvirt-gconfig libvirt-gobject python vapi examples
+SUBDIRS = libvirt-glib libvirt-gconfig libvirt-gobject python vapi examples docs
ACLOCAL_AMFLAGS = -I m4
diff --git a/configure.ac b/configure.ac
index c474f0b..8b90b81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,8 @@ PKG_CHECK_MODULES(GOBJECT2, gobject-2.0 >= $GLIB2_REQUIRED)
PKG_CHECK_MODULES(GIO2, gio-2.0 >= $GLIB2_REQUIRED)
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED)
+GTK_DOC_CHECK([1.10],[--flavour no-tmpl])
+
dnl Extra link-time flags for Cygwin.
dnl Copied from libxml2 configure.in, but I removed mingw changes
dnl for now since I'm not supporting mingw at present. - RWMJ
@@ -223,6 +225,10 @@ AC_OUTPUT(Makefile
examples/Makefile
python/Makefile
vapi/Makefile
+ docs/Makefile
+ docs/libvirt-glib/Makefile
+ docs/libvirt-gobject/Makefile
+ docs/libvirt-gconfig/Makefile
libvirt-glib-1.0.pc
libvirt-gconfig-1.0.pc
libvirt-gobject-1.0.pc
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..f8e9b25
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = libvirt-glib libvirt-gobject libvirt-gconfig
diff --git a/docs/libvirt-gconfig/Libvirt-gconfig-docs.xml b/docs/libvirt-gconfig/Libvirt-gconfig-docs.xml
new file mode 100644
index 0000000..9719734
--- /dev/null
+++ b/docs/libvirt-gconfig/Libvirt-gconfig-docs.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+ <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
+]>
+<book id="index">
+ <bookinfo>
+ <title>Libvirt-gconfig Reference Manual</title>
+ </bookinfo>
+
+ <chapter>
+ <title>Libvirt-gconfig</title>
+ <xi:include href="xml/libvirt-gconfig-object.xml"/>
+ <xi:include href="xml/libvirt-gconfig-domain.xml"/>
+ <xi:include href="xml/libvirt-gconfig-domain-snapshot.xml"/>
+ <xi:include href="xml/libvirt-gconfig-interface.xml"/>
+ <xi:include href="xml/libvirt-gconfig-network-filter.xml"/>
+ <xi:include href="xml/libvirt-gconfig-network.xml"/>
+ <xi:include href="xml/libvirt-gconfig-node-device.xml"/>
+ <xi:include href="xml/libvirt-gconfig-secret.xml"/>
+ <xi:include href="xml/libvirt-gconfig-storage-pool.xml"/>
+ <xi:include href="xml/libvirt-gconfig-storage-vol.xml"/>
+ <xi:include href="xml/libvirt-gconfig-capabilities.xml"/>
+ </chapter>
+ <chapter id="object-tree">
+ <title>Object Hierarchy</title>
+ <xi:include href="xml/tree_index.sgml"/>
+ </chapter>
+ <index id="api-index-full">
+ <title>API Index</title>
+ <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+ </index>
+
+ <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+</book>
diff --git a/docs/libvirt-gconfig/Libvirt-gconfig-sections.txt b/docs/libvirt-gconfig/Libvirt-gconfig-sections.txt
new file mode 100644
index 0000000..e2dcc5f
--- /dev/null
+++ b/docs/libvirt-gconfig/Libvirt-gconfig-sections.txt
@@ -0,0 +1,166 @@
+<SECTION>
+<FILE>libvirt-gconfig-object</FILE>
+<TITLE>GVirConfigObject</TITLE>
+gvir_config_object_validate
+gvir_config_object_get_doc
+gvir_config_object_get_schema
+<SUBSECTION Standard>
+GVIR_TYPE_OBJECT
+GVIR_OBJECT
+GVIR_OBJECT_CLASS
+GVIR_IS_OBJECT
+GVIR_IS_OBJECT_CLASS
+GVIR_OBJECT_GET_CLASS
+<SUBSECTION Private>
+GVirConfigObjectPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gconfig-domain</FILE>
+<TITLE>GVirConfigDomain</TITLE>
+gvir_config_domain_new
+<SUBSECTION Standard>
+GVIR_TYPE_DOMAIN
+GVIR_DOMAIN
+GVIR_DOMAIN_CLASS
+GVIR_IS_DOMAIN
+GVIR_IS_DOMAIN_CLASS
+GVIR_DOMAIN_GET_CLASS
+<SUBSECTION Private>
+GVirConfigDomainPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gconfig-domain-snapshot</FILE>
+<TITLE>GVirConfigDomainSnapshot</TITLE>
+gvir_config_domain_snapshot_new
+<SUBSECTION Standard>
+GVIR_TYPE_DOMAIN_SNAPSHOT
+GVIR_DOMAIN_SNAPSHOT
+GVIR_DOMAIN_SNAPSHOT_CLASS
+GVIR_IS_DOMAIN_SNAPSHOT
+GVIR_IS_DOMAIN_SNAPSHOT_CLASS
+GVIR_DOMAIN_SNAPSHOT_GET_CLASS
+<SUBSECTION Private>
+GVirConfigDomainSnapshotPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gconfig-interface</FILE>
+<TITLE>GVirConfigInterface</TITLE>
+gvir_config_interface_new
+<SUBSECTION Standard>
+GVIR_TYPE_INTERFACE
+GVIR_INTERFACE
+GVIR_INTERFACE_CLASS
+GVIR_IS_INTERFACE
+GVIR_IS_INTERFACE_CLASS
+GVIR_INTERFACE_GET_CLASS
+<SUBSECTION Private>
+GVirConfigInterfacePrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gconfig-network-filter</FILE>
+<TITLE>GVirConfigNetworkFilter</TITLE>
+gvir_config_network_filter_new
+<SUBSECTION Standard>
+GVIR_TYPE_NETWORK_FILTER
+GVIR_NETWORK_FILTER
+GVIR_NETWORK_FILTER_CLASS
+GVIR_IS_NETWORK_FILTER
+GVIR_IS_NETWORK_FILTER_CLASS
+GVIR_NETWORK_FILTER_GET_CLASS
+<SUBSECTION Private>
+GVirConfigNetworkFilterPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gconfig-network</FILE>
+<TITLE>GVirConfigNetwork</TITLE>
+gvir_config_network_new
+<SUBSECTION Standard>
+GVIR_TYPE_NETWORK
+GVIR_NETWORK
+GVIR_NETWORK_CLASS
+GVIR_IS_NETWORK
+GVIR_IS_NETWORK_CLASS
+GVIR_NETWORK_GET_CLASS
+<SUBSECTION Private>
+GVirConfigNetworkPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gconfig-node-device</FILE>
+<TITLE>GVirConfigNodeDevice</TITLE>
+gvir_config_node_device_new
+<SUBSECTION Standard>
+GVIR_TYPE_NODE_DEVICE
+GVIR_NODE_DEVICE
+GVIR_NODE_DEVICE_CLASS
+GVIR_IS_NODE_DEVICE
+GVIR_IS_NODE_DEVICE_CLASS
+GVIR_NODE_DEVICE_GET_CLASS
+<SUBSECTION Private>
+GVirConfigNodeDevicePrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gconfig-secret</FILE>
+<TITLE>GVirConfigSecret</TITLE>
+gvir_config_secret_get_new
+<SUBSECTION Standard>
+GVIR_TYPE_SECRET
+GVIR_SECRET
+GVIR_SECRET_CLASS
+GVIR_IS_SECRET
+GVIR_IS_SECRET_CLASS
+GVIR_SECRET_GET_CLASS
+<SUBSECTION Private>
+GVirConfigSecretPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gconfig-storage-pool</FILE>
+<TITLE>GVirConfigStoragePool</TITLE>
+gvir_config_storage_pool_new
+<SUBSECTION Standard>
+GVIR_TYPE_STORAGE_POOL
+GVIR_STORAGE_POOL
+GVIR_STORAGE_POOL_CLASS
+GVIR_IS_STORAGE_POOL
+GVIR_IS_STORAGE_POOL_CLASS
+GVIR_STORAGE_POOL_GET_CLASS
+<SUBSECTION Private>
+GVirConfigStoragePoolPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gconfig-storage-vol</FILE>
+<TITLE>GVirConfigStorageVol</TITLE>
+gvir_config_storage_vol_new
+<SUBSECTION Standard>
+GVIR_TYPE_STORAGE_VOL
+GVIR_STORAGE_VOL
+GVIR_STORAGE_VOL_CLASS
+GVIR_IS_STORAGE_VOL
+GVIR_IS_STORAGE_VOL_CLASS
+GVIR_STORAGE_VOL_GET_CLASS
+<SUBSECTION Private>
+GVirConfigStorageVolPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gconfig-capabilities</FILE>
+<TITLE>GVirConfigCapabilities</TITLE>
+gvir_config_capabilities_new
+<SUBSECTION Standard>
+GVIR_TYPE_CAPABILITIES
+GVIR_CAPABILITIES
+GVIR_CAPABILITIES_CLASS
+GVIR_IS_CAPABILITIES
+GVIR_IS_CAPABILITIES_CLASS
+GVIR_CAPABILITIES_GET_CLASS
+<SUBSECTION Private>
+GVirConfigCapabilitiesPrivate
+</SECTION>
diff --git a/docs/libvirt-gconfig/Makefile.am b/docs/libvirt-gconfig/Makefile.am
new file mode 100644
index 0000000..de5bc82
--- /dev/null
+++ b/docs/libvirt-gconfig/Makefile.am
@@ -0,0 +1,44 @@
+
+DOC_MODULE=Libvirt-gconfig
+
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
+
+# Must not use $(top_srcdir) since gtkdoc-scan runs
+# from the srcdir already, not the builddir
+DOC_SOURCE_DIR=../../libvirt-gconfig
+
+SCANGOBJ_OPTIONS=
+
+SCAN_OPTIONS=
+
+MKDB_OPTIONS=--sgml-mode --output-format=xml
+
+MKTMPL_OPTIONS=
+
+MKHTML_OPTIONS=
+
+FIXXREF_OPTIONS=
+
+HFILE_GLOB=$(top_srcdir)/libvirt-gconfig/*.h
+CFILE_GLOB=$(top_srcdir)/libvirt-gconfig/*.c
+
+IGNORE_HFILES=
+
+HTML_IMAGES=
+
+content_files=
+
+expand_content_files=
+
+GTKDOC_CFLAGS= \
+ $(LIBXML_CFLAGS) \
+ $(GOBJECT_CFLAGS)\
+ $(GIO_CFLAGS)
+GTKDOC_LIBS = \
+ $(LIBXML_LIBS) \
+ $(GOBJECT_LIBS) \
+ $(GIO_LIBS) \
+ $(top_builddir)/libvirt-gconfig/libvirt-gconfig-1.0.la
+
+include $(top_srcdir)/gtk-doc.make
+
diff --git a/docs/libvirt-glib/Libvirt-glib-docs.xml b/docs/libvirt-glib/Libvirt-glib-docs.xml
new file mode 100644
index 0000000..5b6a873
--- /dev/null
+++ b/docs/libvirt-glib/Libvirt-glib-docs.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+ <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
+]>
+<book id="index">
+ <bookinfo>
+ <title>Libvirt-glib Reference Manual</title>
+ </bookinfo>
+
+ <chapter>
+ <title>Libvirt-glib</title>
+ <xi:include href="xml/libvirt-glib-main.xml"/>
+ <xi:include href="xml/libvirt-glib-error.xml"/>
+ <xi:include href="xml/libvirt-glib-event.xml"/>
+ </chapter>
+ <chapter id="object-tree">
+ <title>Object Hierarchy</title>
+ <xi:include href="xml/tree_index.sgml"/>
+ </chapter>
+ <index id="api-index-full">
+ <title>API Index</title>
+ <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+ </index>
+
+ <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+</book>
diff --git a/docs/libvirt-glib/Libvirt-glib-overrides.txt b/docs/libvirt-glib/Libvirt-glib-overrides.txt
new file mode 100644
index 0000000..e69de29
diff --git a/docs/libvirt-glib/Libvirt-glib-sections.txt b/docs/libvirt-glib/Libvirt-glib-sections.txt
new file mode 100644
index 0000000..506a2ba
--- /dev/null
+++ b/docs/libvirt-glib/Libvirt-glib-sections.txt
@@ -0,0 +1,22 @@
+<SECTION>
+<FILE>libvirt-glib-main</FILE>
+<TITLE>Initialization</TITLE>
+gvir_init
+gvir_init_check
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-glib-event</FILE>
+<TITLE>Event Handling</TITLE>
+gvir_event_register
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-glib-error</FILE>
+<TITLE>Error Handling</TITLE>
+gvir_error_new
+gvir_error_new_literal
+gvir_error_new_valist
+</SECTION>
+
+
diff --git a/docs/libvirt-glib/Libvirt-glib.types b/docs/libvirt-glib/Libvirt-glib.types
new file mode 100644
index 0000000..e69de29
diff --git a/docs/libvirt-glib/Makefile.am b/docs/libvirt-glib/Makefile.am
new file mode 100644
index 0000000..01190d1
--- /dev/null
+++ b/docs/libvirt-glib/Makefile.am
@@ -0,0 +1,44 @@
+
+DOC_MODULE=Libvirt-glib
+
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
+
+# Must not use $(top_srcdir) since gtkdoc-scan runs
+# from the srcdir already, not the builddir
+DOC_SOURCE_DIR=../../libvirt-glib
+
+SCANGOBJ_OPTIONS=
+
+SCAN_OPTIONS=
+
+MKDB_OPTIONS=--sgml-mode --output-format=xml
+
+MKTMPL_OPTIONS=
+
+MKHTML_OPTIONS=
+
+FIXXREF_OPTIONS=
+
+HFILE_GLOB=$(top_srcdir)/libvirt-glib/*.h
+CFILE_GLOB=$(top_srcdir)/libvirt-glib/*.c
+
+IGNORE_HFILES=
+
+HTML_IMAGES=
+
+content_files=
+
+expand_content_files=
+
+GTKDOC_CFLAGS= \
+ $(LIBXML_CFLAGS) \
+ $(GOBJECT_CFLAGS)\
+ $(GIO_CFLAGS)
+GTKDOC_LIBS = \
+ $(LIBXML_LIBS) \
+ $(GOBJECT_LIBS) \
+ $(GIO_LIBS) \
+ $(top_builddir)/libvirt-glib/libvirt-glib-1.0.la
+
+include $(top_srcdir)/gtk-doc.make
+
diff --git a/docs/libvirt-gobject/Libvirt-gobject-docs.xml b/docs/libvirt-gobject/Libvirt-gobject-docs.xml
new file mode 100644
index 0000000..40e6cd0
--- /dev/null
+++ b/docs/libvirt-gobject/Libvirt-gobject-docs.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+ <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
+]>
+<book id="index">
+ <bookinfo>
+ <title>Libvirt-gobject Reference Manual</title>
+ </bookinfo>
+
+ <chapter>
+ <title>Libvirt-gobject</title>
+ <xi:include href="xml/libvirt-gobject-connection.xml"/>
+ <xi:include href="xml/libvirt-gobject-domain.xml"/>
+ <xi:include href="xml/libvirt-gobject-domain-snapshot.xml"/>
+ <xi:include href="xml/libvirt-gobject-interface.xml"/>
+ <xi:include href="xml/libvirt-gobject-manager.xml"/>
+ <xi:include href="xml/libvirt-gobject-network-filter.xml"/>
+ <xi:include href="xml/libvirt-gobject-network.xml"/>
+ <xi:include href="xml/libvirt-gobject-node-device.xml"/>
+ <xi:include href="xml/libvirt-gobject-secret.xml"/>
+ <xi:include href="xml/libvirt-gobject-storage-pool.xml"/>
+ <xi:include href="xml/libvirt-gobject-storage-vol.xml"/>
+ <xi:include href="xml/libvirt-gobject-stream.xml"/>
+ </chapter>
+ <chapter id="object-tree">
+ <title>Object Hierarchy</title>
+ <xi:include href="xml/tree_index.sgml"/>
+ </chapter>
+ <index id="api-index-full">
+ <title>API Index</title>
+ <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+ </index>
+
+ <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+</book>
diff --git a/docs/libvirt-gobject/Libvirt-gobject-sections.txt b/docs/libvirt-gobject/Libvirt-gobject-sections.txt
new file mode 100644
index 0000000..b6baf2e
--- /dev/null
+++ b/docs/libvirt-gobject/Libvirt-gobject-sections.txt
@@ -0,0 +1,244 @@
+<SECTION>
+<FILE>libvirt-gobject-connection</FILE>
+<TITLE>GVirConnection</TITLE>
+gvir_connection_new
+gvir_connection_open
+gvir_connection_open_async
+gvir_connection_open_finish
+gvir_connection_is_open
+gvir_connection_close
+gvir_connection_fetch_domains
+gvir_connection_fetch_domains_async
+gvir_connection_fetch_domains_finish
+gvir_connection_get_uri
+gvir_connection_get_domains
+gvir_connection_get_domain
+gvir_connection_find_domain_by_id
+gvir_connection_find_domain_by_name
+gvir_connection_create_domain
+gvir_connection_fetch_storage_pools
+gvir_connection_fetch_storage_pools_async
+gvir_connection_fetch_storage_pools_finish
+gvir_connection_get_storage_pools
+gvir_connection_get_storage_pool
+gvir_connection_find_storage_pool_by_name
+gvir_connection_create_storage_pool
+gvir_connection_get_stream
+<SUBSECTION Standard>
+GVIR_TYPE_CONNECTION
+GVIR_CONNECTION
+GVIR_CONNECTION_CLASS
+GVIR_IS_CONNECTION
+GVIR_IS_CONNECTION_CLASS
+GVIR_CONNECTION_GET_CLASS
+<SUBSECTION Private>
+GVirConnectionPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gobject-domain</FILE>
+<TITLE>GVirDomain</TITLE>
+GVirDomainState
+GVirDomainInfo
+gvir_domain_get_name
+gvir_domain_get_uuid
+gvir_domain_get_id
+gvir_domain_start
+gvir_domain_resume
+gvir_domain_stop
+gvir_domain_delete
+gvir_domain_shutdown
+gvir_domain_reboot
+gvir_domain_get_info
+gvir_domain_get_config
+gvir_domain_screenshot
+<SUBSECTION Standard>
+GVIR_TYPE_DOMAIN
+GVIR_DOMAIN
+GVIR_DOMAIN_CLASS
+GVIR_IS_DOMAIN
+GVIR_IS_DOMAIN_CLASS
+GVIR_DOMAIN_GET_CLASS
+<SUBSECTION Private>
+GVirDomainPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gobject-domain-snapshot</FILE>
+<TITLE>GVirDomainSnapshot</TITLE>
+gvir_domain_snapshot_get_name
+gvir_domain_snapshot_get_config
+<SUBSECTION Standard>
+GVIR_TYPE_DOMAIN_SNAPSHOT
+GVIR_DOMAIN_SNAPSHOT
+GVIR_DOMAIN_SNAPSHOT_CLASS
+GVIR_IS_DOMAIN_SNAPSHOT
+GVIR_IS_DOMAIN_SNAPSHOT_CLASS
+GVIR_DOMAIN_SNAPSHOT_GET_CLASS
+<SUBSECTION Private>
+GVirDomainSnapshotPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gobject-interface</FILE>
+<TITLE>GVirInterface</TITLE>
+gvir_interface_get_name
+gvir_interface_get_config
+<SUBSECTION Standard>
+GVIR_TYPE_INTERFACE
+GVIR_INTERFACE
+GVIR_INTERFACE_CLASS
+GVIR_IS_INTERFACE
+GVIR_IS_INTERFACE_CLASS
+GVIR_INTERFACE_GET_CLASS
+<SUBSECTION Private>
+GVirInterfacePrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gobject-manager</FILE>
+<TITLE>GVirManager</TITLE>
+gvir_manager_new
+gvir_manager_add_connection
+gvir_manager_remove_connection
+gvir_manager_get_connections
+gvir_manager_find_connection_by_uri
+<SUBSECTION Standard>
+GVIR_TYPE_MANAGER
+GVIR_MANAGER
+GVIR_MANAGER_CLASS
+GVIR_IS_MANAGER
+GVIR_IS_MANAGER_CLASS
+GVIR_MANAGER_GET_CLASS
+<SUBSECTION Private>
+GVirManagerPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gobject-network-filter</FILE>
+<TITLE>GVirNetworkFilter</TITLE>
+gvir_network_filter_get_name
+gvir_network_filter_get_uuid
+gvir_network_filter_get_config
+<SUBSECTION Standard>
+GVIR_TYPE_NETWORK_FILTER
+GVIR_NETWORK_FILTER
+GVIR_NETWORK_FILTER_CLASS
+GVIR_IS_NETWORK_FILTER
+GVIR_IS_NETWORK_FILTER_CLASS
+GVIR_NETWORK_FILTER_GET_CLASS
+<SUBSECTION Private>
+GVirNetworkFilterPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gobject-network</FILE>
+<TITLE>GVirNetwork</TITLE>
+gvir_network_get_name
+gvir_network_get_uuid
+gvir_network_get_config
+<SUBSECTION Standard>
+GVIR_TYPE_NETWORK
+GVIR_NETWORK
+GVIR_NETWORK_CLASS
+GVIR_IS_NETWORK
+GVIR_IS_NETWORK_CLASS
+GVIR_NETWORK_GET_CLASS
+<SUBSECTION Private>
+GVirNetworkPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gobject-node-device</FILE>
+<TITLE>GVirNodeDevice</TITLE>
+gvir_node_device_get_name
+gvir_node_device_get_config
+<SUBSECTION Standard>
+GVIR_TYPE_NODE_DEVICE
+GVIR_NODE_DEVICE
+GVIR_NODE_DEVICE_CLASS
+GVIR_IS_NODE_DEVICE
+GVIR_IS_NODE_DEVICE_CLASS
+GVIR_NODE_DEVICE_GET_CLASS
+<SUBSECTION Private>
+GVirNodeDevicePrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gobject-secret</FILE>
+<TITLE>GVirSecret</TITLE>
+gvir_secret_get_name
+gvir_secret_get_uuid
+gvir_secret_get_config
+<SUBSECTION Standard>
+GVIR_TYPE_SECRET
+GVIR_SECRET
+GVIR_SECRET_CLASS
+GVIR_IS_SECRET
+GVIR_IS_SECRET_CLASS
+GVIR_SECRET_GET_CLASS
+<SUBSECTION Private>
+GVirSecretPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gobject-storage-pool</FILE>
+<TITLE>GVirStoragePool</TITLE>
+gvir_storage_pool_get_name
+gvir_storage_pool_get_uuid
+gvir_storage_pool_get_config
+gvir_storage_pool_refresh
+gvir_storage_pool_refresh_async
+gvir_storage_pool_refresh_finish
+gvir_storage_pool_get_volumes
+gvir_storage_pool_get_volume
+gvir_storage_pool_create_volume
+gvir_storage_pool_build
+gvir_storage_pool_build_async
+gvir_storage_pool_build_finish
+gvir_storage_pool_start
+gvir_storage_pool_start_async
+gvir_storage_pool_start_finish
+<SUBSECTION Standard>
+GVIR_TYPE_STORAGE_POOL
+GVIR_STORAGE_POOL
+GVIR_STORAGE_POOL_CLASS
+GVIR_IS_STORAGE_POOL
+GVIR_IS_STORAGE_POOL_CLASS
+GVIR_STORAGE_POOL_GET_CLASS
+<SUBSECTION Private>
+GVirStoragePoolPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gobject-storage-vol</FILE>
+<TITLE>GVirStorageVol</TITLE>
+gvir_storage_vol_get_name
+gvir_storage_vol_get_path
+gvir_storage_vol_get_config
+<SUBSECTION Standard>
+GVIR_TYPE_STORAGE_VOL
+GVIR_STORAGE_VOL
+GVIR_STORAGE_VOL_CLASS
+GVIR_IS_STORAGE_VOL
+GVIR_IS_STORAGE_VOL_CLASS
+GVIR_STORAGE_VOL_GET_CLASS
+<SUBSECTION Private>
+GVirStorageVolPrivate
+</SECTION>
+
+<SECTION>
+<FILE>libvirt-gobject-stream</FILE>
+<TITLE>GVirStream</TITLE>
+gvir_stream_get_name
+gvir_stream_get_config
+<SUBSECTION Standard>
+GVIR_TYPE_STREAM
+GVIR_STREAM
+GVIR_STREAM_CLASS
+GVIR_IS_STREAM
+GVIR_IS_STREAM_CLASS
+GVIR_STREAM_GET_CLASS
+<SUBSECTION Private>
+GVirStreamPrivate
+</SECTION>
diff --git a/docs/libvirt-gobject/Makefile.am b/docs/libvirt-gobject/Makefile.am
new file mode 100644
index 0000000..26f3ce4
--- /dev/null
+++ b/docs/libvirt-gobject/Makefile.am
@@ -0,0 +1,44 @@
+
+DOC_MODULE=Libvirt-gobject
+
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
+
+# Must not use $(top_srcdir) since gtkdoc-scan runs
+# from the srcdir already, not the builddir
+DOC_SOURCE_DIR=../../libvirt-gobject
+
+SCANGOBJ_OPTIONS=
+
+SCAN_OPTIONS=
+
+MKDB_OPTIONS=--sgml-mode --output-format=xml
+
+MKTMPL_OPTIONS=
+
+MKHTML_OPTIONS=
+
+FIXXREF_OPTIONS=
+
+HFILE_GLOB=$(top_srcdir)/libvirt-gobject/*.h
+CFILE_GLOB=$(top_srcdir)/libvirt-gobject/*.c
+
+IGNORE_HFILES=
+
+HTML_IMAGES=
+
+content_files=
+
+expand_content_files=
+
+GTKDOC_CFLAGS= \
+ $(LIBXML_CFLAGS) \
+ $(GOBJECT_CFLAGS)\
+ $(GIO_CFLAGS)
+GTKDOC_LIBS = \
+ $(LIBXML_LIBS) \
+ $(GOBJECT_LIBS) \
+ $(GIO_LIBS) \
+ $(top_builddir)/libvirt-gobject/libvirt-gobject-1.0.la
+
+include $(top_srcdir)/gtk-doc.make
+
diff --git a/gtk-doc.make b/gtk-doc.make
new file mode 100644
index 0000000..9841de4
--- /dev/null
+++ b/gtk-doc.make
@@ -0,0 +1,256 @@
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN = $(LIBTOOL) --mode=execute
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN =
+endif
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+SETUP_FILES = \
+ $(content_files) \
+ $(DOC_MAIN_SGML_FILE) \
+ $(DOC_MODULE)-sections.txt \
+ $(DOC_MODULE)-overrides.txt
+
+EXTRA_DIST = \
+ $(HTML_IMAGES) \
+ $(SETUP_FILES)
+
+DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \
+ html-build.stamp pdf-build.stamp \
+ sgml.stamp html.stamp pdf.stamp
+
+SCANOBJ_FILES = \
+ $(DOC_MODULE).args \
+ $(DOC_MODULE).hierarchy \
+ $(DOC_MODULE).interfaces \
+ $(DOC_MODULE).prerequisites \
+ $(DOC_MODULE).signals
+
+REPORT_FILES = \
+ $(DOC_MODULE)-undocumented.txt \
+ $(DOC_MODULE)-undeclared.txt \
+ $(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+if GTK_DOC_BUILD_HTML
+HTML_BUILD_STAMP=html-build.stamp
+else
+HTML_BUILD_STAMP=
+endif
+if GTK_DOC_BUILD_PDF
+PDF_BUILD_STAMP=pdf-build.stamp
+else
+PDF_BUILD_STAMP=
+endif
+
+all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
+else
+all-local:
+endif
+
+docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
+
+$(REPORT_FILES): sgml-build.stamp
+
+#### setup ####
+
+setup-build.stamp:
+ -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+ echo ' DOC Preparing build'; \
+ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \
+ if test "x$$files" != "x" ; then \
+ for file in $$files ; do \
+ test -f $(abs_srcdir)/$$file && \
+ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \
+ done; \
+ fi; \
+ fi
+ @touch setup-build.stamp
+
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ @echo ' DOC Scanning header files'
+ @_source_dir='' ; \
+ for i in $(DOC_SOURCE_DIR) ; do \
+ _source_dir="$${_source_dir} --source-dir=$$i" ; \
+ done ; \
+ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
+ echo " DOC Introspecting gobjects"; \
+ scanobj_options=""; \
+ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \
+ if test "$(?)" = "0"; then \
+ if test "x$(V)" = "x1"; then \
+ scanobj_options="--verbose"; \
+ fi; \
+ fi; \
+ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
+ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \
+ else \
+ for i in $(SCANOBJ_FILES) ; do \
+ test -f $$i || touch $$i ; \
+ done \
+ fi
+ @touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+ @true
+
+#### xml ####
+
+sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files)
+ @echo ' DOC Building XML'
+ @_source_dir='' ; \
+ for i in $(DOC_SOURCE_DIR) ; do \
+ _source_dir="$${_source_dir} --source-dir=$$i" ; \
+ done ; \
+ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
+ @touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+ @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ @echo ' DOC Building HTML'
+ @rm -rf html
+ @mkdir html
+ @mkhtml_options=""; \
+ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \
+ if test "$(?)" = "0"; then \
+ if test "x$(V)" = "x1"; then \
+ mkhtml_options="$$mkhtml_options --verbose"; \
+ fi; \
+ fi; \
+ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
+ if test "$(?)" = "0"; then \
+ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \
+ fi; \
+ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+ -@test "x$(HTML_IMAGES)" = "x" || \
+ for file in $(HTML_IMAGES) ; do \
+ if test -f $(abs_srcdir)/$$file ; then \
+ cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
+ fi; \
+ if test -f $(abs_builddir)/$$file ; then \
+ cp $(abs_builddir)/$$file $(abs_builddir)/html; \
+ fi; \
+ done;
+ @echo ' DOC Fixing cross-references'
+ @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+ @touch html-build.stamp
+
+#### pdf ####
+
+pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ @echo ' DOC Building PDF'
+ @rm -f $(DOC_MODULE).pdf
+ @mkpdf_options=""; \
+ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \
+ if test "$(?)" = "0"; then \
+ if test "x$(V)" = "x1"; then \
+ mkpdf_options="$$mkpdf_options --verbose"; \
+ fi; \
+ fi; \
+ if test "x$(HTML_IMAGES)" != "x"; then \
+ for img in $(HTML_IMAGES); do \
+ part=`dirname $$img`; \
+ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
+ if test $$? != 0; then \
+ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
+ fi; \
+ done; \
+ fi; \
+ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
+ @touch pdf-build.stamp
+
+##############
+
+clean-local:
+ @rm -f *~ *.bak
+ @rm -rf .libs
+
+distclean-local:
+ @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
+ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+ @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+ rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
+ fi
+
+maintainer-clean-local: clean
+ @rm -rf xml html
+
+install-data-local:
+ @installfiles=`echo $(builddir)/html/*`; \
+ if test "$$installfiles" = '$(builddir)/html/*'; \
+ then echo 1>&2 'Nothing to install' ; \
+ else \
+ if test -n "$(DOC_MODULE_VERSION)"; then \
+ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+ else \
+ installdir="$(DESTDIR)$(TARGET_DIR)"; \
+ fi; \
+ $(mkinstalldirs) $${installdir} ; \
+ for i in $$installfiles; do \
+ echo ' $(INSTALL_DATA) '$$i ; \
+ $(INSTALL_DATA) $$i $${installdir}; \
+ done; \
+ if test -n "$(DOC_MODULE_VERSION)"; then \
+ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
+ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
+ fi; \
+ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \
+ fi
+
+uninstall-local:
+ @if test -n "$(DOC_MODULE_VERSION)"; then \
+ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+ else \
+ installdir="$(DESTDIR)$(TARGET_DIR)"; \
+ fi; \
+ rm -rf $${installdir}
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+ @echo "*** gtk-doc must be installed and enabled in order to make dist"
+ @false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+ @mkdir $(distdir)/html
+ @cp ./html/* $(distdir)/html
+ @-cp ./$(DOC_MODULE).pdf $(distdir)/
+ @-cp ./$(DOC_MODULE).types $(distdir)/
+ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/
+ @cd $(distdir) && rm -f $(DISTCLEANFILES)
+ @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs
--
1.7.7
13 years
[libvirt] [libvirt[]PATCH v2] Fix URI alias prefix matching
by Wen Ruo Lv
With /etc/libvirt/libvirt.conf below:
uri_aliases = [
"hail=qemu:///system",
"sleet=qemu+ssh://root 9 115 122 57/system",
"sam=qemu+unix:///system?socket=/var/run/libvirt/libvirt-sock",
]
Issue "virsh -c hailly" results in matching "hail=qemu:///system"
Fix URI alias prefix matching when connecting
Signed-off-by: Wen Ruo Lv <lvroyce(a)linux.vnet.ibm.com>
---
src/libvirt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/libvirt.c b/src/libvirt.c
index e9d1a29..54e283f 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -1022,7 +1022,7 @@ virConnectOpenFindURIAliasMatch(virConfValuePtr value, const char *alias, char *
return -1;
}
- if (STREQLEN(entry->str, alias, offset-entry->str)) {
+ if (STREQLEN(entry->str, alias, strlen(alias))) {
VIR_DEBUG("Resolved alias '%s' to '%s'",
alias, offset+1);
if (!(*uri = strdup(offset+1))) {
--
1.7.4.1
13 years
[libvirt] [PATCH] qemu: plug memory leak
by ajia@redhat.com
From: Alex Jia <ajia(a)redhat.com>
Detected by Coverity. Leak introduced in commit 6cabc0b.
* src/qemu/qemu_command.c: Clean up on failure.
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
src/qemu/qemu_command.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0936492..02958cb 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4995,6 +4995,7 @@ qemuBuildCommandLine(virConnectPtr conn,
}
if (sound->model == VIR_DOMAIN_SOUND_MODEL_ICH6) {
+ VIR_FREE(modstr);
qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("this QEMU binary lacks hda support"));
goto error;
--
1.7.1
13 years