[libvirt] [PATCH] boolean shadows a typedef in rpcndr.h when compiled with MinGW
by Matthias Bolte
Alter the offending variable names to fix this.
---
src/esx/esx_vi.h | 2 +-
src/esx/esx_vi_types.h | 4 ++--
src/util/json.c | 14 +++++++-------
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/esx/esx_vi.h b/src/esx/esx_vi.h
index 840a3c3..f76689c 100644
--- a/src/esx/esx_vi.h
+++ b/src/esx/esx_vi.h
@@ -138,7 +138,7 @@ struct _esxVI_Enumeration {
int esxVI_Enumeration_CastFromAnyType(virConnectPtr conn,
const esxVI_Enumeration *enumeration,
- esxVI_AnyType *anyType, int *boolean);
+ esxVI_AnyType *anyType, int *value);
int esxVI_Enumeration_Serialize(virConnectPtr conn,
const esxVI_Enumeration *enumeration,
int value, const char *element,
diff --git a/src/esx/esx_vi_types.h b/src/esx/esx_vi_types.h
index 4183324..77f712e 100644
--- a/src/esx/esx_vi_types.h
+++ b/src/esx/esx_vi_types.h
@@ -131,11 +131,11 @@ enum _esxVI_Boolean {
esxVI_Boolean_False,
};
-int esxVI_Boolean_Serialize(virConnectPtr conn, esxVI_Boolean boolean,
+int esxVI_Boolean_Serialize(virConnectPtr conn, esxVI_Boolean boolean_,
const char *element, virBufferPtr output,
esxVI_Boolean required);
int esxVI_Boolean_Deserialize(virConnectPtr conn, xmlNodePtr node,
- esxVI_Boolean *boolean);
+ esxVI_Boolean *boolean_);
diff --git a/src/util/json.c b/src/util/json.c
index 35f6e52..4b3e629 100644
--- a/src/util/json.c
+++ b/src/util/json.c
@@ -201,7 +201,7 @@ virJSONValuePtr virJSONValueNewNumberDouble(double data)
}
-virJSONValuePtr virJSONValueNewBoolean(int boolean)
+virJSONValuePtr virJSONValueNewBoolean(int boolean_)
{
virJSONValuePtr val;
@@ -209,7 +209,7 @@ virJSONValuePtr virJSONValueNewBoolean(int boolean)
return NULL;
val->type = VIR_JSON_TYPE_BOOLEAN;
- val->data.boolean = boolean;
+ val->data.boolean = boolean_;
return val;
}
@@ -350,9 +350,9 @@ int virJSONValueObjectAppendNumberDouble(virJSONValuePtr object, const char *key
return 0;
}
-int virJSONValueObjectAppendBoolean(virJSONValuePtr object, const char *key, int boolean)
+int virJSONValueObjectAppendBoolean(virJSONValuePtr object, const char *key, int boolean_)
{
- virJSONValuePtr jvalue = virJSONValueNewBoolean(boolean);
+ virJSONValuePtr jvalue = virJSONValueNewBoolean(boolean_);
if (!jvalue)
return -1;
if (virJSONValueObjectAppend(object, key, jvalue) < 0) {
@@ -688,12 +688,12 @@ static int virJSONParserHandleNull(void * ctx)
return 1;
}
-static int virJSONParserHandleBoolean(void * ctx, int boolean)
+static int virJSONParserHandleBoolean(void * ctx, int boolean_)
{
virJSONParserPtr parser = ctx;
- virJSONValuePtr value = virJSONValueNewBoolean(boolean);
+ virJSONValuePtr value = virJSONValueNewBoolean(boolean_);
- VIR_DEBUG("parser=%p boolean=%d", parser, boolean);
+ VIR_DEBUG("parser=%p boolean=%d", parser, boolean_);
if (!value)
return 0;
--
1.6.0.4
15 years
[libvirt] Problem about Libvirt and Virtualbox....
by Prashant Wakchaure
Hello,
Currently I am working on libvirt API and I am trying to connect virtualbox
with libvirt.
I using ubuntu 9.10 and libvirt 0.7.0 but I am unable to connect to
virtualbox (3.1.2) to the libvirt.
Please guide me.....
Waiting for your replay.....
15 years
[libvirt] [PATCH] convert missing server entry points into unsupported errors
by Daniel Veillard
If using a remote access, sometimes an RPC entry point is not
available, and currently we just end up with a raw:
error: unknown procedure: xxx
error, while this should be more cleanly reported as an unsupported
entry point like for local access, e.g when calling an older RHEL-5.3
without patch
paphio:~/libvirt -> tools/virsh --connect xen+ssh://root@test3 dominfo
test5
Id: 1
Name: test5
UUID: 62cd4e2e-5117-e4ba-2dbf-68a37031c3e4
OS Type: linux
State: idle
CPU(s): 1
CPU time: 254.5s
Max memory: 524288 kB
Used memory: 524108 kB
error: unknown procedure: 122
with patch
paphio:~/libvirt -> tools/virsh --connect xen+ssh://root@test3 dominfo
test5
Id: 1
Name: test5
UUID: 62cd4e2e-5117-e4ba-2dbf-68a37031c3e4
OS Type: linux
State: idle
CPU(s): 1
CPU time: 254.6s
Max memory: 524288 kB
Used memory: 524080 kB
paphio:~/libvirt ->
the application knows that some feature may not be avilable but expects
the VIR_ERR_NO_SUPPORT to be reported, not an internal RPC problem,
I also noticed that we do
"%s", thiscall->err.message ? *thiscall->err.message : NULL);
for passing the error message, which is a sure way to crash if there is
no error message and changing this to
"%s", thiscall->err.message ? *thiscall->err.message : "unknown");
I expect the server to always return an error message in practice, but
this need fixing.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
15 years
[libvirt] [PATCH v4 00/11] CPU selection patches
by Jiri Denemark
Hi,
This is a third version of CPU selection patchset.
Patches with documentation collected from commit logs of this patch set
will come later.
Changes in version 4:
- really fix all CPUID assembly code
- fixed arguments to virXPathULongHex()
- added flags to virConnectCompareCPU() API
- unused double linked list converted to single linked one
- reorganized patchset to allow bisecting
- fixes in qemu driver
- added cpu_conf.c to libvirt_proxy as dep of domain_conf.
- disabled XML parsing code in cpu_conf.c for proxy
- more cpus added to cpu_map.xml
- document virConnectCompareCPU() API call
Changes in version 3:
- fix build on i386
Changes in version 2:
- virConnectGetHostCPU() API call was completely removed
- 'CPU driver implementation' (11/14) patch was dropped
- virConnectCompareCPU() API call is implemented directly by hypervisor
drivers
- new cpuCompareXML() internal function to make virConnectCompareCPU()
simpler
Jirka
Jiri Denemark (11):
XML schema for CPU flags
XML parsing/formating code for CPU flags
Public API
Internal driver API
Public API implementation
Wire protocol format and server side dispatcher
Remote driver
CPU selection infrastructure
CPU map for models and features
Implement CPU selection in QEMU driver
Implement virsh commands
configure.in | 20 +
daemon/remote.c | 22 +
docs/schemas/capability.rng | 46 ++-
docs/schemas/domain.rng | 62 +++
include/libvirt/libvirt.h.in | 25 +
include/libvirt/virterror.h | 1 +
proxy/Makefile.am | 1 +
src/Makefile.am | 23 +-
src/conf/capabilities.c | 31 ++-
src/conf/capabilities.h | 6 +
src/conf/cpu_conf.c | 368 +++++++++++++
src/conf/cpu_conf.h | 119 +++++
src/conf/domain_conf.c | 15 +
src/conf/domain_conf.h | 2 +
src/cpu/cpu.c | 242 +++++++++
src/cpu/cpu.h | 129 +++++
src/cpu/cpu_generic.c | 123 +++++
src/cpu/cpu_generic.h | 32 ++
src/cpu/cpu_map.c | 130 +++++
src/cpu/cpu_map.h | 41 ++
src/cpu/cpu_map.xml | 345 +++++++++++++
src/cpu/cpu_x86.c | 1162 ++++++++++++++++++++++++++++++++++++++++++
src/cpu/cpu_x86.h | 31 ++
src/cpu/cpu_x86_data.h | 45 ++
src/driver.h | 5 +
src/esx/esx_driver.c | 1 +
src/libvirt.c | 43 ++
src/libvirt_private.syms | 19 +
src/libvirt_public.syms | 5 +
src/lxc/lxc_driver.c | 1 +
src/opennebula/one_driver.c | 1 +
src/openvz/openvz_driver.c | 1 +
src/phyp/phyp_driver.c | 1 +
src/qemu/qemu_conf.c | 398 ++++++++++++++-
src/qemu/qemu_conf.h | 7 +
src/qemu/qemu_driver.c | 43 ++-
src/remote/remote_driver.c | 27 +
src/remote/remote_protocol.x | 13 +-
src/test/test_driver.c | 1 +
src/uml/uml_driver.c | 1 +
src/util/virterror.c | 3 +
src/vbox/vbox_tmpl.c | 1 +
src/xen/xen_driver.c | 1 +
tools/virsh.c | 65 +++
44 files changed, 3624 insertions(+), 34 deletions(-)
create mode 100644 src/conf/cpu_conf.c
create mode 100644 src/conf/cpu_conf.h
create mode 100644 src/cpu/cpu.c
create mode 100644 src/cpu/cpu.h
create mode 100644 src/cpu/cpu_generic.c
create mode 100644 src/cpu/cpu_generic.h
create mode 100644 src/cpu/cpu_map.c
create mode 100644 src/cpu/cpu_map.h
create mode 100644 src/cpu/cpu_map.xml
create mode 100644 src/cpu/cpu_x86.c
create mode 100644 src/cpu/cpu_x86.h
create mode 100644 src/cpu/cpu_x86_data.h
15 years
[libvirt] [PATCH] Report an error if no XDR library can be found
by Matthias Bolte
---
configure.in | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/configure.in b/configure.in
index 3be11f2..81548b8 100644
--- a/configure.in
+++ b/configure.in
@@ -116,7 +116,8 @@ dnl If portablexdr is installed, prefer that.
dnl Otherwise try -lrpc (Cygwin) -lxdr (some MinGW), -lnsl (Solaris)
dnl or none (most Unix)
AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[
- AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl])
+ AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl],[],
+ [AC_MSG_ERROR([Cannot find a XDR library])])
])
AC_CHECK_LIB([intl],[gettext],[])
--
1.6.0.4
15 years
[libvirt] [PATCH] cpu: Fix memory leaks in x86FeatureLoad and x86ModelLoad
by Matthias Bolte
Also backup and restore the original ctxt->node value in x86FeatureLoad.
---
src/cpu/cpu_x86.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index af0a65b..7c50261 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -274,6 +274,7 @@ x86FeatureLoad(xmlXPathContextPtr ctxt,
{
struct x86_map *map = data;
xmlNodePtr *nodes = NULL;
+ xmlNodePtr ctxt_node = ctxt->node;
struct x86_feature *feature = NULL;
int ret = 0;
int i;
@@ -340,6 +341,9 @@ x86FeatureLoad(xmlXPathContextPtr ctxt,
}
out:
+ ctxt->node = ctxt_node;
+ VIR_FREE(nodes);
+
return ret;
no_memory:
@@ -664,6 +668,7 @@ x86ModelLoad(xmlXPathContextPtr ctxt,
}
out:
+ VIR_FREE(nodes);
return ret;
no_memory:
--
1.6.0.4
15 years
[libvirt] [PATCH] Add myself to AUTHORS :-)
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
AUTHORS | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index 8bb652f..bff1b20 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -80,6 +80,7 @@ Patches have also been contributed by:
Satoru SATOH <satoru.satoh(a)gmail.com>
Paolo Bonzini <pbonzini(a)redhat.com>
Miloslav Trmač <mitr(a)redhat.com>
+ Jiri Denemark <jdenemar(a)redhat.com>
[....send patches to get your name here....]
--
1.6.6.rc4
15 years
[libvirt] [PATCH] Only probe for CPU models if required
by Jiri Denemark
CPU models where probe everytime a qemu command line was built. But it
only makes sense to do so when a guest's XML contains CPU model.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_conf.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 36bf9a2..3f6c79b 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1778,17 +1778,18 @@ qemudBuildCommandLineCPU(virConnectPtr conn,
{
const virCPUDefPtr host = driver->caps->host.cpu;
virCPUDefPtr guest = NULL;
- unsigned int ncpus;
+ unsigned int ncpus = 0;
const char **cpus = NULL;
union cpuData *data = NULL;
int ret = -1;
virBuffer buf = VIR_BUFFER_INITIALIZER;
int i;
- if (qemudProbeCPUModels(emulator, ut->machine, &ncpus, &cpus) < 0)
+ if (def->cpu && def->cpu->model
+ && qemudProbeCPUModels(emulator, ut->machine, &ncpus, &cpus) < 0)
goto cleanup;
- if (ncpus > 0 && host && def->cpu && def->cpu->model) {
+ if (ncpus > 0 && host) {
virCPUCompareResult cmp;
cmp = cpuGuestData(conn, host, def->cpu, &data);
--
1.6.6.rc4
15 years
[libvirt] [PATCH] Install cpu_map.xml
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/Makefile.am | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 7d731de..42108c0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,7 +16,7 @@ INCLUDES = \
-DSBINDIR=\""$(sbindir)"\" \
-DSYSCONF_DIR="\"$(sysconfdir)\"" \
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
- -DDATADIR=\""$(datadir)/libvirt"\" \
+ -DDATADIR=\""$(pkgdatadir)"\" \
-DLOCAL_STATE_DIR=\""$(localstatedir)"\" \
-DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
$(WARN_CFLAGS) \
@@ -287,7 +287,9 @@ CPU_SOURCES = \
cpu/cpu_x86.h cpu/cpu_x86.c cpu/cpu_x86_data.h \
cpu/cpu_map.h cpu/cpu_map.c
-EXTRA_DIST += cpu/cpu_map.xml
+pkgdata_DATA = cpu/cpu_map.xml
+
+EXTRA_DIST += $(pkgdata_DATA)
#########################
#
--
1.6.6.rc4
15 years