[libvirt] [PATCH] docs: formatdomain: fix links in the table of contents
by Ján Tomko
---
Pushed under the trivial rule.
docs/formatdomain.html.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 9284534..d9814dd 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2350,7 +2350,7 @@
<h4><a name="elementsHostDev">Host device assignment</a></h4>
- <h5><a href="elementsHostDevSubsys">USB / PCI / SCSI devices</a></h5>
+ <h5><a name="elementsHostDevSubsys">USB / PCI / SCSI devices</a></h5>
<p>
USB, PCI and SCSI devices attached to the host can be passed through
@@ -2526,7 +2526,7 @@
</dl>
- <h5><a href="elementsHostDevCaps">Block / character devices</a></h5>
+ <h5><a name="elementsHostDevCaps">Block / character devices</a></h5>
<p>
Block / character devices from the host can be passed through
--
1.8.1.5
11 years, 6 months
[libvirt] [libvirt-perl][PATCH] Fix typo in domain help page
by Zhe Peng
The help page of $dom->set_metadata have a typo,this patch fix it.
---
lib/Sys/Virt/Domain.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/Sys/Virt/Domain.pm b/lib/Sys/Virt/Domain.pm
index a502029..053f127 100644
--- a/lib/Sys/Virt/Domain.pm
+++ b/lib/Sys/Virt/Domain.pm
@@ -112,7 +112,7 @@ C<$flags> parameter defaults to zero.
Sets the metadata element of type C<$type> to hold the value
C<$val>. If C<$type> is C<Sys::Virt::Domain::METADATA_ELEMENT>
then the C<$key> and C<$uri> elements specify an XML namespace
-to use, otherwise they should both be C<nudef>. The optional
+to use, otherwise they should both be C<undef>. The optional
C<$flags> parameter defaults to zero.
=item $dom->is_active()
--
1.7.7.6
11 years, 6 months
[libvirt] [PATCH] esx: Replace almost all esxVI_String_DeepCopyValue vith VIR_STRDUP
by Matthias Bolte
---
src/esx/esx_driver.c | 8 ++++----
src/esx/esx_network_driver.c | 6 ++----
src/esx/esx_storage_backend_iscsi.c | 2 +-
src/esx/esx_storage_backend_vmfs.c | 4 ++--
src/esx/esx_util.c | 11 ++++-------
src/esx/esx_vi.c | 24 +++++++++++-------------
src/esx/esx_vi_types.c | 4 ++--
7 files changed, 26 insertions(+), 33 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 85640ce..b55ef45 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -183,7 +183,7 @@ esxParseVMXFileName(const char *fileName, void *opaque)
++tmp;
}
- if (esxVI_String_DeepCopyValue(&strippedFileName, tmp) < 0) {
+ if (VIR_STRDUP(strippedFileName, tmp) < 0) {
goto cleanup;
}
@@ -209,7 +209,7 @@ esxParseVMXFileName(const char *fileName, void *opaque)
/* Fallback to direct datastore name match */
if (result == NULL && STRPREFIX(fileName, "/vmfs/volumes/")) {
- if (esxVI_String_DeepCopyValue(©OfFileName, fileName) < 0) {
+ if (VIR_STRDUP(copyOfFileName, fileName) < 0) {
goto cleanup;
}
@@ -248,7 +248,7 @@ esxParseVMXFileName(const char *fileName, void *opaque)
/* If it's an absolute path outside of a datastore just use it as is */
if (result == NULL && *fileName == '/') {
/* FIXME: need to deal with Windows paths here too */
- if (esxVI_String_DeepCopyValue(&result, fileName) < 0) {
+ if (VIR_STRDUP(result, fileName) < 0) {
goto cleanup;
}
}
@@ -353,7 +353,7 @@ esxFormatVMXFileName(const char *fileName, void *opaque)
result = virBufferContentAndReset(&buffer);
} else if (*fileName == '/') {
/* FIXME: need to deal with Windows paths here too */
- if (esxVI_String_DeepCopyValue(&result, fileName) < 0) {
+ if (VIR_STRDUP(result, fileName) < 0) {
goto cleanup;
}
} else {
diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c
index a4842da..9aacffc 100644
--- a/src/esx/esx_network_driver.c
+++ b/src/esx/esx_network_driver.c
@@ -478,10 +478,8 @@ esxNetworkDefineXML(virConnectPtr conn, const char *xml)
if (esxVI_HostPortGroupSpec_Alloc(&hostPortGroupSpec) < 0 ||
esxVI_HostNetworkPolicy_Alloc(&hostPortGroupSpec->policy) < 0 ||
esxVI_Int_Alloc(&hostPortGroupSpec->vlanId) < 0 ||
- esxVI_String_DeepCopyValue(&hostPortGroupSpec->name,
- def->portGroups[i].name) < 0 ||
- esxVI_String_DeepCopyValue(&hostPortGroupSpec->vswitchName,
- def->name) < 0) {
+ VIR_STRDUP(hostPortGroupSpec->name, def->portGroups[i].name) < 0 ||
+ VIR_STRDUP(hostPortGroupSpec->vswitchName, def->name) < 0) {
goto cleanup;
}
diff --git a/src/esx/esx_storage_backend_iscsi.c b/src/esx/esx_storage_backend_iscsi.c
index d91d7b0..6e1095e 100644
--- a/src/esx/esx_storage_backend_iscsi.c
+++ b/src/esx/esx_storage_backend_iscsi.c
@@ -672,7 +672,7 @@ esxStorageVolGetXMLDesc(virStorageVolPtr volume,
virUUIDFormat(md5, uuid_string);
- if (esxVI_String_DeepCopyValue(&def.key, uuid_string) < 0) {
+ if (VIR_STRDUP(def.key, uuid_string) < 0) {
goto cleanup;
}
diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backend_vmfs.c
index 3b4d73a..2966109 100644
--- a/src/esx/esx_storage_backend_vmfs.c
+++ b/src/esx/esx_storage_backend_vmfs.c
@@ -1031,7 +1031,7 @@ esxStorageVolCreateXML(virStoragePoolPtr pool,
}
} else {
/* Fall back to the path as key */
- if (esxVI_String_DeepCopyValue(&key, datastorePath) < 0) {
+ if (VIR_STRDUP(key, datastorePath) < 0) {
goto cleanup;
}
}
@@ -1233,7 +1233,7 @@ esxStorageVolCreateXMLFrom(virStoragePoolPtr pool,
}
} else {
/* Fall back to the path as key */
- if (esxVI_String_DeepCopyValue(&key, datastorePath) < 0) {
+ if (VIR_STRDUP(key, datastorePath) < 0) {
goto cleanup;
}
}
diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c
index 001dd99..a4b931d 100644
--- a/src/esx/esx_util.c
+++ b/src/esx/esx_util.c
@@ -237,7 +237,7 @@ esxUtil_ParseDatastorePath(const char *datastorePath, char **datastoreName,
return -1;
}
- if (esxVI_String_DeepCopyValue(©OfDatastorePath, datastorePath) < 0) {
+ if (VIR_STRDUP(copyOfDatastorePath, datastorePath) < 0) {
goto cleanup;
}
@@ -251,8 +251,7 @@ esxUtil_ParseDatastorePath(const char *datastorePath, char **datastoreName,
}
if (datastoreName != NULL &&
- esxVI_String_DeepCopyValue(datastoreName,
- preliminaryDatastoreName) < 0) {
+ VIR_STRDUP(*datastoreName, preliminaryDatastoreName) < 0) {
goto cleanup;
}
@@ -266,8 +265,7 @@ esxUtil_ParseDatastorePath(const char *datastorePath, char **datastoreName,
}
if (directoryAndFileName != NULL &&
- esxVI_String_DeepCopyValue(directoryAndFileName,
- preliminaryDirectoryAndFileName) < 0) {
+ VIR_STRDUP(*directoryAndFileName, preliminaryDirectoryAndFileName) < 0) {
goto cleanup;
}
@@ -279,8 +277,7 @@ esxUtil_ParseDatastorePath(const char *datastorePath, char **datastoreName,
*tmp = '\0';
}
- if (esxVI_String_DeepCopyValue(directoryName,
- preliminaryDirectoryAndFileName) < 0) {
+ if (VIR_STRDUP(*directoryName, preliminaryDirectoryAndFileName) < 0) {
goto cleanup;
}
}
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index d0df13d..8dc2592 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -801,10 +801,10 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
if (esxVI_CURL_Alloc(&ctx->curl) < 0 ||
esxVI_CURL_Connect(ctx->curl, parsedUri) < 0 ||
- esxVI_String_DeepCopyValue(&ctx->url, url) < 0 ||
- esxVI_String_DeepCopyValue(&ctx->ipAddress, ipAddress) < 0 ||
- esxVI_String_DeepCopyValue(&ctx->username, username) < 0 ||
- esxVI_String_DeepCopyValue(&ctx->password, password) < 0) {
+ VIR_STRDUP(ctx->url, url) < 0 ||
+ VIR_STRDUP(ctx->ipAddress, ipAddress) < 0 ||
+ VIR_STRDUP(ctx->username, username) < 0 ||
+ VIR_STRDUP(ctx->password, password) < 0) {
return -1;
}
@@ -1779,9 +1779,9 @@ esxVI_BuildSelectSet(esxVI_SelectionSpec **selectSet,
}
if (esxVI_TraversalSpec_Alloc(&traversalSpec) < 0 ||
- esxVI_String_DeepCopyValue(&traversalSpec->name, name) < 0 ||
- esxVI_String_DeepCopyValue(&traversalSpec->type, type) < 0 ||
- esxVI_String_DeepCopyValue(&traversalSpec->path, path) < 0) {
+ VIR_STRDUP(traversalSpec->name, name) < 0 ||
+ VIR_STRDUP(traversalSpec->type, type) < 0 ||
+ VIR_STRDUP(traversalSpec->path, path) < 0) {
goto failure;
}
@@ -1792,8 +1792,7 @@ esxVI_BuildSelectSet(esxVI_SelectionSpec **selectSet,
while (currentSelectSetName != NULL && *currentSelectSetName != '\0') {
if (esxVI_SelectionSpec_Alloc(&selectionSpec) < 0 ||
- esxVI_String_DeepCopyValue(&selectionSpec->name,
- currentSelectSetName) < 0 ||
+ VIR_STRDUP(selectionSpec->name, currentSelectSetName) < 0 ||
esxVI_SelectionSpec_AppendToList(&traversalSpec->selectSet,
selectionSpec) < 0) {
goto failure;
@@ -3486,7 +3485,7 @@ esxVI_LookupFileInfoByDatastorePath(esxVI_Context *ctx,
goto cleanup;
}
- if (esxVI_String_DeepCopyValue(&fileName, directoryAndFileName) < 0) {
+ if (VIR_STRDUP(fileName, directoryAndFileName) < 0) {
goto cleanup;
}
} else {
@@ -3506,8 +3505,7 @@ esxVI_LookupFileInfoByDatastorePath(esxVI_Context *ctx,
goto cleanup;
}
- if (esxVI_String_DeepCopyValue(&fileName,
- directoryAndFileName + length + 1) < 0) {
+ if (VIR_STRDUP(fileName, directoryAndFileName + length + 1) < 0) {
goto cleanup;
}
}
@@ -3803,7 +3801,7 @@ esxVI_LookupStorageVolumeKeyByDatastorePath(esxVI_Context *ctx,
if (*key == NULL) {
/* Other files don't have a UUID, fall back to the path as key */
- if (esxVI_String_DeepCopyValue(key, datastorePath) < 0) {
+ if (VIR_STRDUP(*key, datastorePath) < 0) {
goto cleanup;
}
}
diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c
index 4b2b397..1a26556 100644
--- a/src/esx/esx_vi_types.c
+++ b/src/esx/esx_vi_types.c
@@ -963,8 +963,8 @@ esxVI_AnyType_DeepCopy(esxVI_AnyType **dest, esxVI_AnyType *src)
(*dest)->type = src->type;
- if (esxVI_String_DeepCopyValue(&(*dest)->other, src->other) < 0 ||
- esxVI_String_DeepCopyValue(&(*dest)->value, src->value) < 0) {
+ if (VIR_STRDUP((*dest)->other, src->other) < 0 ||
+ VIR_STRDUP((*dest)->value, src->value) < 0) {
goto failure;
}
--
1.7.9.5
11 years, 6 months
[libvirt] [PATCH] vmware: Restore OOM error reporting in vmwareCopyVMXFileName
by Matthias Bolte
Got lost in commit e6ab10098066dd04794ff2ee5d10bc9b1db93327.
---
src/vmware/vmware_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c
index 4b61a9c..6c24187 100644
--- a/src/vmware/vmware_conf.c
+++ b/src/vmware/vmware_conf.c
@@ -490,6 +490,6 @@ vmwareCopyVMXFileName(const char *datastorePath, void *opaque ATTRIBUTE_UNUSED)
{
char *path;
- ignore_value(VIR_STRDUP_QUIET(path, datastorePath));
+ ignore_value(VIR_STRDUP(path, datastorePath));
return path;
}
--
1.7.9.5
11 years, 6 months
[libvirt] [PATCH 0/4] Properly use LGPL
by Eric Blake
The FSF has some recommendations on how to use the LGPL, and
we weren't always following them. This series tries to clean
things up to avoid any confusion on our intent - our source
code is LGPLv2+ (except for vbox which is LGPLv2-only); the
resulting binaries might be under a different license based
on what they link with (for example, libvirt_parthelper is
GPLv3+, and a future patch will make libvirtd GPLv2-only so
as to let libvirt.so become LGPLv2+ instead of its current
polluted LGPLv2-only when built with vbox).
One thing I was unable to figure out: when switching between
branches, older branches still create a non-versioned COPYING
file; git doesn't like to move to this commit unless you manually
remove that file first. Unfortunately, I don't know of any
clean way to avoid that problem, unless we _don't_ version-control
COPYING and instead copy it out of .gnulib/docs/COPYINGv2 as
needed (similar to how configure.ac used to copy it from
COPYING.LIB before this series). If having to manually remove
COPYING before switching branches proves too annoying, and if
you agree that libvirt.git can get away without COPYING (since
it is really only tarballs that NEED it), then I can tweak patch
2 to keep populating COPYING at configure time, rather than
version-controlling it.
Eric Blake (4):
maint: use LGPL correctly
maint: follow recommended practice for using LGPL
maint: refer to correct license file
maint: enforce correct copyright usage
.gitignore | 1 -
COPYING | 339 ++++++++++++++++++++++++++++
COPYING.LIB => COPYING.LESSER | 0
Makefile.am | 17 +-
cfg.mk | 12 +-
configure.ac | 23 +-
daemon/Makefile.am | 15 +-
docs/Makefile.am | 17 +-
docs/schemas/Makefile.am | 17 +-
examples/apparmor/Makefile.am | 17 +-
examples/domain-events/events-c/Makefile.am | 17 +-
examples/dominfo/Makefile.am | 17 +-
examples/domsuspend/Makefile.am | 17 +-
examples/hellolibvirt/Makefile.am | 17 +-
examples/openauth/Makefile.am | 17 +-
examples/python/Makefile.am | 17 +-
examples/systemtap/Makefile.am | 17 +-
examples/xml/nwfilter/Makefile.am | 17 +-
gnulib/lib/Makefile.am | 17 +-
gnulib/tests/Makefile.am | 17 +-
include/Makefile.am | 17 +-
include/libvirt/Makefile.am | 17 +-
libvirt.spec.in | 6 +-
python/Makefile.am | 15 +-
python/tests/Makefile.am | 17 +-
src/Makefile.am | 15 +-
src/rpc/gendispatch.pl | 16 ++
src/rpc/genprotocol.pl | 16 +-
src/vbox/vbox_CAPI_v2_2.h | 2 +-
src/vbox/vbox_CAPI_v3_0.h | 2 +-
src/vbox/vbox_CAPI_v3_1.h | 2 +-
src/vbox/vbox_CAPI_v3_2.h | 2 +-
src/vbox/vbox_CAPI_v4_0.h | 2 +-
src/vbox/vbox_CAPI_v4_1.h | 2 +-
src/vbox/vbox_V2_2.c | 2 +-
src/vbox/vbox_V3_0.c | 2 +-
src/vbox/vbox_V3_1.c | 2 +-
src/vbox/vbox_XPCOMCGlue.c | 2 +-
src/vbox/vbox_XPCOMCGlue.h | 2 +-
src/vbox/vbox_driver.c | 2 +-
src/vbox/vbox_driver.h | 2 +-
src/vbox/vbox_tmpl.c | 2 +-
src/xen/xend_internal.c | 16 +-
src/xen/xend_internal.h | 22 +-
tests/Makefile.am | 15 +-
tools/Makefile.am | 15 +-
46 files changed, 765 insertions(+), 78 deletions(-)
create mode 100644 COPYING
rename COPYING.LIB => COPYING.LESSER (100%)
--
1.8.1.4
11 years, 6 months
[libvirt] [PATCH v3 00/34] Introduce VIR_STRDUP
by Michal Privoznik
Previously this aimed on dropping OOM report from almost
everywhere (v1), then just prepare the ground (v2). Now, it just
aims on introducing VIR_STRDUP and VIR_STRNDUP which do report
OOM error. This will cause rebase conflicts, for sure. Sorry.
Patches available at:
git://gitorious.org/~zippy2/libvirt/michal-staging.git
branch oom4
Michal Privoznik (34):
virstring: Introduce VIR_STRDUP and VIR_STRNDUP
Adapt to VIR_STRDUP and VIR_STRNDUP in daemon/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/conf/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/cpu/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/esx/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/hyperv/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/libxl/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/locking/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/lxc/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/network/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/node_device/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/interface/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/nwfilter/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/openvz/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/parallels/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/phyp/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/qemu/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/remote/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/rpc/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/secret/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/security/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/storage/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/test/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/uml/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/util/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/vbox/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/vmware/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/vmx/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/xen/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/xenapi/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/xenxs/*
Adapt to VIR_STRDUP and VIR_STRNDUP in tests/*
Adapt to VIR_STRDUP and VIR_STRNDUP in src/*
Introduce syntax-check rule to prefer VIR_STRDUP over strdup
HACKING | 11 +
cfg.mk | 8 +
daemon/libvirtd-config.c | 50 ++--
daemon/libvirtd.c | 29 +--
daemon/remote.c | 161 +++++-------
docs/hacking.html.in | 14 +
include/libvirt/libvirt.h.in | 10 +-
src/conf/capabilities.c | 30 +--
src/conf/cpu_conf.c | 19 +-
src/conf/domain_conf.c | 105 +++-----
src/conf/domain_event.c | 39 ++-
src/conf/node_device_conf.c | 29 +--
src/conf/nwfilter_conf.c | 17 +-
src/conf/nwfilter_params.c | 30 +--
src/conf/snapshot_conf.c | 11 +-
src/conf/storage_conf.c | 13 +-
src/conf/virchrdev.c | 12 +-
src/cpu/cpu_generic.c | 8 +-
src/cpu/cpu_map.c | 3 +-
src/cpu/cpu_powerpc.c | 13 +-
src/cpu/cpu_x86.c | 10 +-
src/datatypes.c | 76 +++---
src/esx/esx_driver.c | 43 +--
src/esx/esx_interface_driver.c | 7 +-
src/esx/esx_network_driver.c | 28 +-
src/esx/esx_storage_backend_iscsi.c | 21 +-
src/esx/esx_storage_backend_vmfs.c | 16 +-
src/esx/esx_util.c | 45 +---
src/esx/esx_vi.c | 79 ++----
src/esx/esx_vi_types.c | 36 +--
src/hyperv/hyperv_driver.c | 50 +---
src/hyperv/hyperv_util.c | 18 +-
src/interface/interface_backend_udev.c | 36 +--
src/libvirt.c | 14 +-
src/libvirt_private.syms | 2 +
src/libxl/libxl_conf.c | 86 ++----
src/libxl/libxl_driver.c | 14 +-
src/locking/lock_daemon.c | 30 +--
src/locking/lock_daemon_config.c | 12 +-
src/locking/lock_daemon_dispatch.c | 6 +-
src/locking/lock_driver_lockd.c | 41 ++-
src/locking/lock_driver_sanlock.c | 12 +-
src/locking/lock_manager.c | 4 +-
src/lxc/lxc_cgroup.c | 3 +-
src/lxc/lxc_conf.c | 36 ++-
src/lxc/lxc_container.c | 18 +-
src/lxc/lxc_controller.c | 20 +-
src/lxc/lxc_driver.c | 9 +-
src/lxc/lxc_process.c | 7 +-
src/network/bridge_driver.c | 34 +--
src/node_device/node_device_driver.c | 33 +--
src/node_device/node_device_hal.c | 13 +-
src/node_device/node_device_udev.c | 99 ++-----
src/nodeinfo.c | 5 +-
src/nwfilter/nwfilter_dhcpsnoop.c | 22 +-
src/nwfilter/nwfilter_driver.c | 7 +-
src/nwfilter/nwfilter_ebiptables_driver.c | 2 +-
src/nwfilter/nwfilter_gentech_driver.c | 5 +-
src/nwfilter/nwfilter_learnipaddr.c | 5 +-
src/openvz/openvz_conf.c | 45 ++--
src/openvz/openvz_driver.c | 39 ++-
src/parallels/parallels_driver.c | 71 +++--
src/parallels/parallels_network.c | 23 +-
src/parallels/parallels_storage.c | 62 ++---
src/phyp/phyp_driver.c | 50 +---
src/qemu/qemu_capabilities.c | 79 +++---
src/qemu/qemu_cgroup.c | 4 +-
src/qemu/qemu_command.c | 419 ++++++++++++------------------
src/qemu/qemu_conf.c | 58 ++---
src/qemu/qemu_domain.c | 26 +-
src/qemu/qemu_driver.c | 113 +++-----
src/qemu/qemu_hotplug.c | 15 +-
src/qemu/qemu_migration.c | 20 +-
src/qemu/qemu_monitor_json.c | 63 ++---
src/qemu/qemu_monitor_text.c | 15 +-
src/qemu/qemu_process.c | 64 ++---
src/remote/remote_driver.c | 116 ++++-----
src/rpc/gendispatch.pl | 21 +-
src/rpc/virnetclient.c | 16 +-
src/rpc/virnetmessage.c | 12 +-
src/rpc/virnetsaslcontext.c | 6 +-
src/rpc/virnetserver.c | 6 +-
src/rpc/virnetserverclient.c | 10 +-
src/rpc/virnetservermdns.c | 6 +-
src/rpc/virnetsocket.c | 10 +-
src/rpc/virnetsshsession.c | 76 +++---
src/rpc/virnettlscontext.c | 26 +-
src/secret/secret_driver.c | 5 +-
src/security/security_apparmor.c | 20 +-
src/security/security_dac.c | 23 +-
src/security/security_nop.c | 7 +-
src/security/security_selinux.c | 79 ++----
src/security/virt-aa-helper.c | 4 +-
src/storage/parthelper.c | 5 +-
src/storage/storage_backend.c | 22 +-
src/storage/storage_backend_disk.c | 26 +-
src/storage/storage_backend_fs.c | 34 +--
src/storage/storage_backend_iscsi.c | 17 +-
src/storage/storage_backend_logical.c | 32 +--
src/storage/storage_backend_mpath.c | 5 +-
src/storage/storage_backend_rbd.c | 5 +-
src/storage/storage_backend_scsi.c | 19 +-
src/storage/storage_backend_sheepdog.c | 6 +-
src/storage/storage_driver.c | 18 +-
src/test/test_driver.c | 144 ++++------
src/uml/uml_conf.c | 10 +-
src/uml/uml_driver.c | 8 +-
src/util/virauth.c | 17 +-
src/util/virauthconfig.c | 8 +-
src/util/virbitmap.c | 9 +-
src/util/vircgroup.c | 36 ++-
src/util/vircommand.c | 33 ++-
src/util/virconf.c | 34 +--
src/util/virdnsmasq.c | 22 +-
src/util/virebtables.c | 34 +--
src/util/virebtables.h | 2 +-
src/util/virerror.c | 19 +-
src/util/virhash.c | 5 +-
src/util/viridentity.c | 15 +-
src/util/virinitctl.c | 4 +-
src/util/viriptables.c | 4 +-
src/util/virjson.c | 18 +-
src/util/virkeyfile.c | 13 +-
src/util/virlockspace.c | 25 +-
src/util/virlog.c | 25 +-
src/util/virnetdevmacvlan.c | 16 +-
src/util/virnetdevtap.c | 11 +-
src/util/virnetdevvportprofile.c | 4 +-
src/util/virobject.c | 16 +-
src/util/virpci.c | 14 +-
src/util/virsexpr.c | 37 +--
src/util/virsocketaddr.c | 9 +-
src/util/virstoragefile.c | 18 +-
src/util/virstring.c | 91 ++++++-
src/util/virstring.h | 62 +++++
src/util/virsysinfo.c | 290 ++++++++-------------
src/util/virtypedparam.c | 14 +-
src/util/viruri.c | 58 ++---
src/util/virutil.c | 91 +++----
src/util/virxml.c | 5 +-
src/vbox/vbox_XPCOMCGlue.c | 6 +-
src/vbox/vbox_tmpl.c | 278 +++++++++-----------
src/vmware/vmware_conf.c | 28 +-
src/vmware/vmware_driver.c | 11 +-
src/vmx/vmx.c | 36 +--
src/xen/block_stats.c | 16 +-
src/xen/xen_driver.c | 9 +-
src/xen/xen_hypervisor.c | 19 +-
src/xen/xen_inotify.c | 15 +-
src/xen/xend_internal.c | 78 ++----
src/xen/xm_internal.c | 9 +-
src/xen/xs_internal.c | 44 ++--
src/xenapi/xenapi_driver.c | 59 ++---
src/xenapi/xenapi_utils.c | 39 +--
src/xenxs/xen_sxpr.c | 192 ++++++--------
src/xenxs/xen_xm.c | 94 +++----
tests/commandhelper.c | 10 +-
tests/commandtest.c | 2 +-
tests/openvzutilstest.c | 6 +-
tests/qemumonitortestutils.c | 15 +-
tests/qemuxml2argvtest.c | 23 +-
tests/qemuxmlnstest.c | 4 +-
tests/securityselinuxhelper.c | 9 +-
tests/securityselinuxlabeltest.c | 3 +-
tests/securityselinuxtest.c | 9 +-
tests/storagebackendsheepdogtest.c | 6 +-
tests/testutils.c | 4 +-
tests/testutilsqemu.c | 5 +-
tests/vircgrouptest.c | 2 +-
tests/virnetmessagetest.c | 21 +-
tests/vmx2xmltest.c | 9 +-
tests/xml2vmxtest.c | 9 +-
172 files changed, 2204 insertions(+), 3501 deletions(-)
--
1.8.1.5
11 years, 6 months
[libvirt] [PATCH 0/5] storage_conf: cleanups
by Osier Yang
*** BLURB HERE ***
Osier Yang (5):
storage_conf: Fix the coding stype in storage_conf.c
storage_conf: Fix indentions in storage_conf.c
storage_conf: Various fixes or improvements on pool def parsing
storage_conf: Left fixes or improvements for storage_conf.c
storage_conf: Improve the coding style in storage_conf.h
src/conf/storage_conf.c | 611 +++++++++++++++++++++++++-----------------------
src/conf/storage_conf.h | 120 +++++-----
2 files changed, 381 insertions(+), 350 deletions(-)
--
1.8.1.4
11 years, 6 months
[libvirt] [PATCH 1/3] LXC: remove unnecessary check on root filesystem
by Gao feng
After commit c131525bec5af248e3843224bc5ce8d6435760f0
"Auto-add a root <filesystem> element to LXC containers on startup"
for libvirt lxc, root must be existent.
Signed-off-by: Gao feng <gaofeng(a)cn.fujitsu.com>
---
src/lxc/lxc_container.c | 18 +++++++-----------
src/lxc/lxc_controller.c | 11 -----------
2 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index a1b6aff..b4be4cd 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -1940,17 +1940,13 @@ static int lxcContainerChild(void *data)
root = virDomainGetRootFilesystem(vmDef);
if (argv->nttyPaths) {
- if (root) {
- const char *tty = argv->ttyPaths[0];
- if (STRPREFIX(tty, "/dev/pts/"))
- tty += strlen("/dev/pts/");
- if (virAsprintf(&ttyPath, "%s/%s.devpts/%s",
- LXC_STATE_DIR, vmDef->name, tty) < 0) {
- virReportOOMError();
- goto cleanup;
- }
- } else if (VIR_STRDUP(ttyPath, argv->ttyPaths[0]) < 0) {
- goto cleanup;
+ const char *tty = argv->ttyPaths[0];
+ if (STRPREFIX(tty, "/dev/pts/"))
+ tty += strlen("/dev/pts/");
+ if (virAsprintf(&ttyPath, "%s/%s.devpts/%s",
+ LXC_STATE_DIR, vmDef->name, tty) < 0) {
+ virReportOOMError();
+ goto cleanup;
}
} else if (VIR_STRDUP(ttyPath, "/dev/null") < 0) {
goto cleanup;
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 730236e..2f01958 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -1280,22 +1280,11 @@ cleanup:
static int
virLXCControllerSetupDevPTS(virLXCControllerPtr ctrl)
{
- virDomainFSDefPtr root = virDomainGetRootFilesystem(ctrl->def);
char *mount_options = NULL;
char *opts = NULL;
char *devpts = NULL;
int ret = -1;
- if (!root) {
- if (ctrl->nconsoles != 1) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Expected exactly one console, but got %zu"),
- ctrl->nconsoles);
- return -1;
- }
- return 0;
- }
-
VIR_DEBUG("Setting up private /dev/pts");
/*
--
1.8.1.4
11 years, 6 months
[libvirt] [PATCH] qemuDomainChangeEjectableMedia: Unlock domain while waiting for event
by Michal Privoznik
In 84c59ffa I've tried to fix changing ejectable media process. The
process should go like this:
1) we need to call 'eject' on the monitor
2) we should wait for 'DEVICE_TRAY_MOVED' event
3) now we can issue 'change' command
However, while waiting in step 2) the domain monitor was locked. So
even if qemu reported the desired event, the proper callback was not
called immediately. The monitor handling code needs to lock the
monitor in order to read the event. So that's the first lock we must
not hold while waiting. The second one is the domain lock. When
monitor handling code reads an event, the appropriate callback is
called then. The first thing that each callback does is locking the
corresponding domain as a domain or its device is about to change
state. So we need to unlock both monitor and VM lock. Well, holding
any lock while sleep()-ing is not the best thing to do anyway.
---
src/qemu/qemu_hotplug.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 77d9f4f..88c3a6c 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -94,15 +94,20 @@ int qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
qemuDomainObjEnterMonitor(driver, vm);
ret = qemuMonitorEjectMedia(priv->mon, driveAlias, force);
+ qemuDomainObjExitMonitor(driver, vm);
+ virObjectRef(vm);
/* we don't want to report errors from media tray_open polling */
while (retries--) {
if (origdisk->tray_status == VIR_DOMAIN_DISK_TRAY_OPEN)
break;
+ virObjectUnlock(vm);
VIR_DEBUG("Waiting 500ms for tray to open. Retries left %d", retries);
usleep(500 * 1000); /* sleep 500ms */
+ virObjectLock(vm);
}
+ virObjectUnref(vm);
if (disk->src) {
/* deliberately don't depend on 'ret' as 'eject' may have failed for the
@@ -115,7 +120,7 @@ int qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
if (retries <= 0) {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("Unable to eject media before changing it"));
- goto exit_monitor;
+ goto audit;
}
if (disk->type != VIR_DOMAIN_DISK_TYPE_DIR) {
@@ -124,13 +129,13 @@ int qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
else if (origdisk->format > 0)
format = virStorageFileFormatTypeToString(origdisk->format);
}
+ qemuDomainObjEnterMonitor(driver, vm);
ret = qemuMonitorChangeMedia(priv->mon,
driveAlias,
disk->src, format);
+ qemuDomainObjExitMonitor(driver, vm);
}
-exit_monitor:
- qemuDomainObjExitMonitor(driver, vm);
-
+audit:
virDomainAuditDisk(vm, origdisk->src, disk->src, "update", ret >= 0);
if (ret < 0)
--
1.8.2.1
11 years, 6 months
[libvirt] ANNOUNCE: libvirt 1.0.5.1 maintenance release
by Cole Robinson
libvirt 1.0.5.1 maintenance release is now available. This is
libvirt 1.0.5 with additional bugfixes that have accumulated
upstream since the initial release.
This release can be downloaded at:
http://libvirt.org/sources/stable_updates/libvirt-1.0.5.1.tar.gz
Changes in this version:
* tests: use portable shell code
* qemu: Fix cgroup handling when setting VCPU BW
* daemon: fix leak after listing all volumes
* Fix iohelper usage with streams opened for read
* util: fix virFileOpenAs return value and resulting error logs
* iscsi: don't leak portal string when starting a pool
* don't mention disk controllers in generic controller errors
* conf: don't crash on a tpm device with no backends
* tests: files named '.*-invalid.xml' should fail validation
* qemu: allocate network connections sooner during domain startup
* Make detect_scsi_host_caps a function on all architectures
* Fixup rpcgen code on kFreeBSD too
* Fix release of resources with lockd plugin
* build: avoid non-portable cast of pthread_t
* Fix potential use of undefined variable in remote dispatch code
* build: fix mingw build of virprocess.c
* Fix F_DUPFD_CLOEXEC operation args
* spec: proper soft static allocation of qemu uid
* build: clean up stray files found by 'make distcheck'
* build: always include libvirt_lxc.syms in tarball
* qemu: fix stupid typos in VFIO cgroup setup/teardown
* build: always include sanitytest in tarball
* virInitctlRequest: unbreak make syntax check
* virInitctlRequest: unbreak make syntax check
* network: fix network driver startup for qemu:///session
For info about past maintenance releases, see:
http://wiki.libvirt.org/page/Maintenance_Releases
Thanks,
Cole
11 years, 6 months