[libvirt] [PATCH 00/10] -numa option parsing fixes & improvements
by Eduardo Habkost
This series contains the following:
* Patches 1-7 are multiple bug fixes to the current code
* Patch 8 introduce a feature that libvirt requires since a long time,
and even tries to use it today (in a way that doesn't work,
using the "-numa node,cpus=1,2,3,4" format): having non-contiguous CPU
ranges assigned to a NUMA node.
The last 2 patches I am sending as RFCs:
* Patch 9 makes the "-numa" option deprecated and introduces a "-numa-node"
command-line and config file option.
* Patch 10 adds a small hack to the (now deprecated) "-numa" option, that
makes the "cpus=1,2,3,4" format currently used by libvirt work.
Eduardo Habkost (10):
vl.c: Fix off-by-one bug when handling "-numa node" argument
vl.c: Abort on unknown -numa option type
vl.c: Isolate code specific to "-numa node" option type
vl.c: Check for NUMA node limit inside numa_node_add()
vl.c: Extract -numa "cpus" parsing to separate function
vl.c: handle invalid NUMA CPU ranges properly
vl.c: numa_add_node(): Validate nodeid before using it
vl.c: Support multiple CPU ranges on -numa option
vl.c: Introduce QemuOpts-friendly "-numa-node" config option
vl.c: Handle legacy "-numa node,cpus=A,B,C,D" format
qemu-config.c | 25 +++++++
qemu-options.hx | 50 +++++++++++++-
vl.c | 204 ++++++++++++++++++++++++++++++++++++++++++++++----------
3 files changed, 240 insertions(+), 39 deletions(-)
--
1.7.11.7
11 years, 9 months
[libvirt] [PATCH] complete virterror->virerror name change
by Serge Hallyn
Without these two string changes in generator.py, the
virGetLastError wrapper does not get created in
/usr/share/pyshared/libvirt.py. Noticed when running
tests with virt-install.
Signed-off-by: Serge Hallyn <serge.hallyn(a)ubuntu.com>
---
python/generator.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/generator.py b/python/generator.py
index 5d27f66..71ca883 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -123,7 +123,7 @@ class docParser(xml.sax.handler.ContentHandler):
self.function_return_field = attrs['field']
elif tag == 'enum':
if (attrs['file'] == "libvirt" or
- attrs['file'] == "virterror"):
+ attrs['file'] == "virerror"):
enum(attrs['type'],attrs['name'],attrs['value'])
elif attrs['file'] == "libvirt-lxc":
lxc_enum(attrs['type'],attrs['name'],attrs['value'])
@@ -137,7 +137,7 @@ class docParser(xml.sax.handler.ContentHandler):
if self.function != None:
if (self.function_module == "libvirt" or
self.function_module == "virevent" or
- self.function_module == "virterror"):
+ self.function_module == "virerror"):
function(self.function, self.function_descr,
self.function_return, self.function_args,
self.function_file, self.function_module,
--
1.8.0
11 years, 9 months
[libvirt] [PATCH 0/9] Glue domain and storage
by Osier Yang
This is the 4th part to implement NPIV migration support [1].
Part 1:
https://www.redhat.com/archives/libvir-list/2013-January/msg00859.html
Part 2: (Already ACKed by Michal)
https://www.redhat.com/archives/libvir-list/2013-January/msg00859.html
Part 3:
https://www.redhat.com/archives/libvir-list/2013-January/msg01012.html
To achieve the NPIV migration support, Part 2, Part 3 and this set are
necessary, Part 1 is optional. However, this set can be reviewd independantly.
============
This introduces new XMLs to specify the disk source with storage like
<disk type='volume' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source pool="$pool_name" volume='$vol_name'/>
<seclabel relabel='no'/>
</source>
<target dev='vdb' bus='virtio'/>
</disk>
And before domain starting, the source represented by storage is
translated into the real underlying source.
Diff with RFC:
* The XMLs are more simpler - only using pool name and volume
name to specify disk source.
* Support network pool (rbd, and sheepdog)
* Support startupPolicy for volume type disk
* Support seclabels for volume type disk
* Fix bugs on disk source formating
Osier Yang (9):
rng: Add definition for network disk source
Introduce new XMLs to specify disk source using libvirt storage
New files to glue domain and storage together
Implement translateDiskSourcePool
qemu: Translate the source when starting domain
Support startupPolicy for 'volume' disk
conf: Fix bugs on disk source formating
Support seclabels for volume type disk
Support network pool for volume disk
docs/formatdomain.html.in | 49 +++--
docs/schemas/domaincommon.rng | 111 +++++---
src/Makefile.am | 3 +-
src/conf/domain_conf.c | 278 ++++++++++++++------
src/conf/domain_conf.h | 9 +
src/conf/domain_storage.c | 44 +++
src/conf/domain_storage.h | 37 +++
src/libvirt_private.syms | 5 +
src/qemu/qemu_driver.c | 7 +
src/storage/storage_driver.c | 144 ++++++++++
.../qemuxml2argv-disk-source-pool.xml | 33 +++
tests/qemuxml2xmltest.c | 1 +
12 files changed, 573 insertions(+), 148 deletions(-)
create mode 100644 src/conf/domain_storage.c
create mode 100644 src/conf/domain_storage.h
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml
[1] https://www.redhat.com/archives/libvir-list/2012-November/msg00826.html
Osier
11 years, 9 months
[libvirt] [PATCH 00/17] virsh: Rework string option retrieval
by Peter Krempa
This patchset fixes retrieval of string arguments in virsh to report sane
errors in all the places it's used. A new string option retrieval function is
added that supports error reporting and changes appropriate places to use it.
Along with that this series cleans up a few places with old code and bad style.
*** BLURB HERE ***
Peter Krempa (17):
virsh-snapshot: Fix coding style and remove dead code
virsh-volume: Rename helper function makeCloneXML to vshMakeCloneXML
virsh-pool: Rename helper function buildPoolXML to vshBuildPoolXML
virsh: Add helper to request string arguments with error reporting
virsh-pool: Update pool commands to use vshCommandOptStringReq
virsh-volume: Update volume commands to use vshCommandOptStringReq
virsh-domain-monitor: Update domain commands to use
vshCommandOptStringReq
virsh-domain: Update domain commands to use vshCommandOptStringReq
virsh-host: Update host commands to use vshCommandOptStringReq
virsh-network: Update network commands to use vshCommandOptStringReq
virsh-interface: Update interface commands to use
vshCommandOptStringReq
virsh-nodedev: Update node device commands to use
vshCommandOptStringReq
virsh-nodedev: Refactor error paths, error messages and whitespace
virsh-snapshot: Refactor cmdSnapshotDumpXML
virsh-snapshot: Update snapshot commands to use vshCommandOptStringReq
virsh-nwfilter: Update nwfilter commands to use vshCommandOptStringReq
virsh-secret: Refactor error paths
tools/virsh-domain-monitor.c | 44 +++----
tools/virsh-domain.c | 299 +++++++++++++++++--------------------------
tools/virsh-host.c | 9 +-
tools/virsh-interface.c | 8 +-
tools/virsh-network.c | 19 +--
tools/virsh-nodedev.c | 44 ++++---
tools/virsh-nwfilter.c | 4 +-
tools/virsh-pool.c | 56 ++++----
tools/virsh-secret.c | 30 +++--
tools/virsh-snapshot.c | 55 +++-----
tools/virsh-volume.c | 73 +++++------
tools/virsh.c | 51 ++++++++
tools/virsh.h | 4 +
13 files changed, 320 insertions(+), 376 deletions(-)
--
1.8.1.1
11 years, 9 months
[libvirt] [PATCH] rpc: Fix crash on error paths of message dispatching
by Peter Krempa
When reading and dispatching of a message failed the message was freed
but wasn't removed from the message queue.
After that when the connection was about to be closed the pointer for
the message was still present in the queue and it was passed to
virNetMessageFree which tried to call the callback function from an
uninitialized pointer.
This patch removes the message from the queue before it's freed.
* rpc/virnetserverclient.c: virNetServerClientDispatchRead:
- avoid use after free of RPC messages
---
src/rpc/virnetserverclient.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index af0560e..446e1e9 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -987,6 +987,7 @@ readmore:
/* Decode the header so we can use it for routing decisions */
if (virNetMessageDecodeHeader(msg) < 0) {
+ virNetMessageQueueServe(&client->rx);
virNetMessageFree(msg);
client->wantClose = true;
return;
@@ -996,6 +997,7 @@ readmore:
* file descriptors */
if (msg->header.type == VIR_NET_CALL_WITH_FDS &&
virNetMessageDecodeNumFDs(msg) < 0) {
+ virNetMessageQueueServe(&client->rx);
virNetMessageFree(msg);
client->wantClose = true;
return; /* Error */
@@ -1005,6 +1007,7 @@ readmore:
for (i = msg->donefds ; i < msg->nfds ; i++) {
int rv;
if ((rv = virNetSocketRecvFD(client->sock, &(msg->fds[i]))) < 0) {
+ virNetMessageQueueServe(&client->rx);
virNetMessageFree(msg);
client->wantClose = true;
return;
--
1.8.1.1
11 years, 9 months
[libvirt] [PATCH] hyperv: Avoid Coverity warning about resource leak in hypervOpen
by Matthias Bolte
Coverity tagged the esxhypervPrivate pointer a potentially leaked
because of the conditional free call. But this is a false positive,
there is not actual leak.
Avoid the conditial code to make this more obvious to Coverity.
---
This patch is meant as a replacement for this patch
https://www.redhat.com/archives/libvir-list/2013-January/msg00542.html
src/hyperv/hyperv_driver.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 601a85a..0d2eaae 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -200,14 +200,11 @@ hypervOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
}
conn->privateData = priv;
-
+ priv = NULL;
result = VIR_DRV_OPEN_SUCCESS;
cleanup:
- if (result == VIR_DRV_OPEN_ERROR) {
- hypervFreePrivate(&priv);
- }
-
+ hypervFreePrivate(&priv);
VIR_FREE(username);
VIR_FREE(password);
hypervFreeObject(priv, (hypervObject *)computerSystem);
--
1.7.9.5
11 years, 9 months
[libvirt] [PATCH] esx: Avoid Coverity warning about resource leak in esxOpen
by Matthias Bolte
Commit 4445e16bfa8056980ac643fabf17186f9e685925 changed the signature
of esxConnectToHost and esxConnectToVCenter by replacing the esxPrivate
pointer with virConnectPtr. The esxPrivate pointer was then retrieved
again from virConnectPtr's privateData. This resulted in a NULL pointer
dereference, because the privateData pointer was not yet initialized at
the point where esxConnectToHost and esxConnectToVCenter are called.
This was fixed in commit b126715a48cd0cbe32ec6468c267cd8cf2961c55 that
moved the initialization of privateData before the problematic calls.
Coverity tagged the esxPrivate pointer a potentially leaked because of
the conditional free call. But this is a false positive, there is not
actual leak.
Avoid this warning from Coverity by making the call to esxFreePrivate
unconditional and changing esxConnectToHost and esxConnectToVCenter back
to take a esxPrivate pointer directly. This allows to assign esxPrivate
to the virConnectPtr's privateData pointer as one of the last steps in
esxOpen making it more obvious that it is not initialized during the
earlier steps of esxOpen.
---
This patch is meant as a replacement this patch:
https://www.redhat.com/archives/libvir-list/2013-January/msg00530.html
src/esx/esx_driver.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 1366c81..dad10a1 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -650,7 +650,8 @@ esxCapsInit(esxPrivate *priv)
static int
-esxConnectToHost(virConnectPtr conn,
+esxConnectToHost(esxPrivate *priv,
+ virConnectPtr conn,
virConnectAuthPtr auth,
char **vCenterIpAddress)
{
@@ -663,7 +664,6 @@ esxConnectToHost(virConnectPtr conn,
esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *hostSystem = NULL;
esxVI_Boolean inMaintenanceMode = esxVI_Boolean_Undefined;
- esxPrivate *priv = conn->privateData;
esxVI_ProductVersion expectedProductVersion = STRCASEEQ(conn->uri->scheme, "esx")
? esxVI_ProductVersion_ESX
: esxVI_ProductVersion_GSX;
@@ -785,7 +785,8 @@ esxConnectToHost(virConnectPtr conn,
static int
-esxConnectToVCenter(virConnectPtr conn,
+esxConnectToVCenter(esxPrivate *priv,
+ virConnectPtr conn,
virConnectAuthPtr auth,
const char *hostname,
const char *hostSystemIpAddress)
@@ -796,7 +797,6 @@ esxConnectToVCenter(virConnectPtr conn,
char *unescapedPassword = NULL;
char *password = NULL;
char *url = NULL;
- esxPrivate *priv = conn->privateData;
if (hostSystemIpAddress == NULL &&
(priv->parsedUri->path == NULL || STREQ(priv->parsedUri->path, "/"))) {
@@ -1008,8 +1008,6 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
priv->supportsLongMode = esxVI_Boolean_Undefined;
priv->usedCpuTimeCounterId = -1;
- conn->privateData = priv;
-
/*
* Set the port dependent on the transport protocol if no port is
* specified. This allows us to rely on the port parameter being
@@ -1036,7 +1034,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
if (STRCASEEQ(conn->uri->scheme, "esx") ||
STRCASEEQ(conn->uri->scheme, "gsx")) {
/* Connect to host */
- if (esxConnectToHost(conn, auth,
+ if (esxConnectToHost(priv, conn, auth,
&potentialVCenterIpAddress) < 0) {
goto cleanup;
}
@@ -1075,7 +1073,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
}
}
- if (esxConnectToVCenter(conn, auth,
+ if (esxConnectToVCenter(priv, conn, auth,
vCenterIpAddress,
priv->host->ipAddress) < 0) {
goto cleanup;
@@ -1085,7 +1083,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
priv->primary = priv->host;
} else { /* VPX */
/* Connect to vCenter */
- if (esxConnectToVCenter(conn, auth,
+ if (esxConnectToVCenter(priv, conn, auth,
conn->uri->server,
NULL) < 0) {
goto cleanup;
@@ -1101,13 +1099,12 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
goto cleanup;
}
+ conn->privateData = priv;
+ priv = NULL;
result = VIR_DRV_OPEN_SUCCESS;
cleanup:
- if (result == VIR_DRV_OPEN_ERROR) {
- esxFreePrivate(&priv);
- }
-
+ esxFreePrivate(&priv);
VIR_FREE(potentialVCenterIpAddress);
return result;
--
1.7.9.5
11 years, 9 months
[libvirt] [PATCH] maint: update to latest gnulib
by Eric Blake
CVE-2013-0242 in glibc's regex() can cause a DoS in any daemon
that runs a regex search on user input while in a multibyte locale.
I'm not sure how hard it would be to trigger such a setup for
libvirtd, but rather than risk things, we can avoid the issue:
gnulib has worked around the problem, and by updating to the latest
gnulib, we can avoid the bug even on platforms where glibc has yet
to be patched.
* .gnulib: Update to latest, for various fixes, including regex.
* bootstrap: Resync from upstream.
---
* .gnulib 61c7b1e...a0b25da (45):
> regex: avoid infinite configure test
> openpty: fix bug where HAVE_OPENPTY wasn't defined
> sys_time: port to Solaris 2.6
> regex: test for buffer overrun
> regex: fix buffer overrun in regexp matcher
> mountlist: don't consider "devtmpfs" as dummy
> futimens-tests, utimens-tests: Depend on gettext.
> test-getpeername: fix typo
> bootstrap: remove the need for a sorted .gitignore
> readlinkat: don't depend on gl_FUNC_OPENAT
> statat: new module, split out from fstatat
> autoupdate
> Fix typo in previous change, by including <unistd.h>.
> tests: don't assume fd 99 is closed
> Fix ChangeLog typo.
> stpncpy: port to OS X 10.8
> In intro, say only latest mingw is tested.
> unistd: port to recent mingw
> Fix typo in comment.
> largefile: port better to Mac OS X 10.5
> doc: clarify -Werror
> stdint: fix build with Android's Bionic fox x86
> net_if-tests: port to Solaris 7 + GCC 3.4.6
> net_if-tests: port to older Solaris
> system-quote-tests: port to older Solaris
> c-xvasprintf etc.: fix link errors on older Solaris
> locale: port to Solaris 2.6 and 7 + GNU gettext
> autoupdate
> stdlib: port to Solaris 2.6
> Fix misspellings of "occurred".
> autoupdate
> autoupdate
> doc: update main copyright year
> doc: improve ISO 8601 discussion
> doc: avoid small caps
> regex: conform to strict C
> gnulib-tool: fix incompatibility with autopoint 0.18.2
> autoupdate
> fprintftime: bring back and reword fwrite comment
> autoupdate
> stdio: remove now-unnecessary stdio.c
> unicodeio: depend on stdio, not ignore-value
> fprintftime: depend on stdio, not ignore-value
> stdint-tests: Fix expanded-before-required-warning. * modules/stdint-tests (Depends-on): Use AC_REQUIRE.
> fwrite: silence __wur only for older glibc versions
.gnulib | 2 +-
bootstrap | 44 ++++++++++++++++++++++----------------------
2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/.gnulib b/.gnulib
index 61c7b1e..a0b25da 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 61c7b1e32e11e9e40b4d59ab888a807620befcd3
+Subproject commit a0b25daf001cb1a0352f329e2b5e1640acc88541
diff --git a/bootstrap b/bootstrap
index 012907a..bee7765 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2012-12-28.10; # UTC
+scriptversion=2013-01-20.16; # UTC
# Bootstrap this package from checked-out sources.
@@ -306,34 +306,34 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
die "Bootstrapping from a non-checked-out distribution is risky."
fi
-# Ensure that lines starting with ! sort last, per gitignore conventions
-# for whitelisting exceptions after a more generic blacklist pattern.
-sort_patterns() {
- sort -u "$@" | sed '/^!/ {
- H
- d
- }
- $ {
- P
- x
- s/^\n//
- }' | sed '/^$/d'
+# Strip blank and comment lines to leave significant entries.
+gitignore_entries() {
+ sed '/^#/d; /^$/d' "$@"
}
-# If $STR is not already on a line by itself in $FILE, insert it,
-# sorting the new contents of the file and replacing $FILE with the result.
-insert_sorted_if_absent() {
+# If $STR is not already on a line by itself in $FILE, insert it at the start.
+# Entries are inserted at the start of the ignore list to ensure existing
+# entries starting with ! are not overridden. Such entries support
+# whitelisting exceptions after a more generic blacklist pattern.
+insert_if_absent() {
file=$1
str=$2
test -f $file || touch $file
- echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \
- || { echo "$str" | sort_patterns - $file > $file.bak \
- && mv $file.bak $file; } \
- || die "insert_sorted_if_absent $file $str: failed"
+ test -r $file || die "Error: failed to read ignore file: $file"
+ duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
+ if [ "$duplicate_entries" ] ; then
+ die "Error: Duplicate entries in $file: " $duplicate_entries
+ fi
+ linesold=$(gitignore_entries $file | wc -l)
+ linesnew=$(echo "$str" | gitignore_entries - $file | sort -u | wc -l)
+ if [ $linesold != $linesnew ] ; then
+ { echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
+ || die "insert_if_absent $file $str: failed"
+ fi
}
# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
-# insert_sorted_if_absent.
+# insert_if_absent.
insert_vc_ignore() {
vc_ignore_file="$1"
pattern="$2"
@@ -344,7 +344,7 @@ insert_vc_ignore() {
# .gitignore entry.
pattern=$(echo "$pattern" | sed s,^,/,);;
esac
- insert_sorted_if_absent "$vc_ignore_file" "$pattern"
+ insert_if_absent "$vc_ignore_file" "$pattern"
}
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
--
1.8.1
11 years, 9 months
[libvirt] This patch adds the label to lxc-enter-namespace
by Daniel J Walsh
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
(2nd pass)
lxc-enter-namespace allows a process from outside a container to start a
process inside a container. One problem with the current code is the process
running within the container would run with the label of the process that
created it.
For example if the admin process is running as unconfined_t and executes the
following command
# virsh -c lxc:/// lxc-enter-namespace --nolabel dan -- /bin/ps -eZ
LABEL PID TTY TIME CMD
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 1 pts/0 00:00:00 systemd
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 3 pts/1 00:00:00 sh
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 24 ? 00:00:00 systemd-journal
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 29 ? 00:00:00 dhclient
staff_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 47 ? 00:00:00 ps
Note the ps command is running as unconfined_t, After this patch,
virsh -c lxc:/// lxc-enter-namespace dan -- /bin/ps -eZ
LABEL PID TTY TIME CMD
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 1 pts/0 00:00:00 systemd
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 3 pts/1 00:00:00 sh
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 24 ? 00:00:00 systemd-journal
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 32 ? 00:00:00 dhclient
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 38 ? 00:00:00 ps
I also add a --nolabel command to virsh, which can go back to the original
behaviour.
virsh -c lxc:/// lxc-enter-namespace --nolabel dan -- /bin/ps -eZ
LABEL PID TTY TIME CMD
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 1 pts/0 00:00:00 systemd
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 3 pts/1 00:00:00 sh
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 24 ? 00:00:00 systemd-journal
system_u:system_r:svirt_lxc_net_t:s0:c0.c1023 32 ? 00:00:00 dhclient
staff_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 37 ? 00:00:00 ps
Everything seems to be working perfectly now.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlEC320ACgkQrlYvE4MpobPDjwCfTLjGarwDOLA333vE+XVp0Zj2
LYkAn3WGX3h309/kJejbE3uvXnIUCKJV
=rwfM
-----END PGP SIGNATURE-----
11 years, 9 months
[libvirt] [PATCH 0/7] documentation improvements - again
by Claudio Bley
Hi.
The first two patches are aimed at avoiding generation of empty
argument description lists, which might happen if a function has
no documentation for some argument or its return type.
This was happening with virTypedParams* functions (see
https://www.redhat.com/archives/libvir-list/2013-January/msg01428.html)
Patch #3 is just a small cleanup, since a table is not the right thing
to use and it looks better in some circumstances.
Patch #4 sports processing of code blocks embedded into comments.
Basically, it is similar to markdown syntax, except that you only need
to indent your code with 2 spaces.
Patch #5 prepares for the later patches being able to distinguish
between different <pre> blocks.
Patch #6 and #7 are pretty much self explanatory, I guess.
Note, that SHJS's license is GPLv3.
Claudio Bley (7):
docs: don't write out empty info attributes for function arguments
docs: only generate function argument info for args with a
description
docs: use a div instead of a 3 column table for undisclosed notices
docs: process code blocks similar to markdown
docs: add class "description" to div's containing descriptions
docs: define style of code blocks inside descriptions
docs: syntax highlight code blocks using SHJS
docs/apibuild.py | 8 +-
docs/libvirt.css | 8 ++
docs/newapi.xsl | 209 +++++++++++++++++++++++++++++--------------------
docs/page.xsl | 5 +-
docs/sh_c.min.js | 1 +
docs/sh_emacs.min.css | 1 +
docs/sh_main.min.js | 4 +
7 files changed, 148 insertions(+), 88 deletions(-)
create mode 100644 docs/sh_c.min.js
create mode 100644 docs/sh_emacs.min.css
create mode 100644 docs/sh_main.min.js
--
1.7.9.5
11 years, 9 months