Re: [libvirt] [PATCH] esx: Generate implicit _this macros

2011-05-14 Thread Matthias Bolte
2011/5/13 Eric Blake : > On 05/01/2011 01:57 PM, Matthias Bolte wrote: >> --- >>  src/Makefile.am             |    1 + >>  src/esx/esx_vi_generator.py |   48 >> -- >>  src/esx/esx_vi_methods.c    |   40 +++---

Re: [libvirt] [PATCH] esx: Move the Event type from the VI generator to manually written code

2011-05-14 Thread Matthias Bolte
2011/5/13 Eric Blake : > On 05/01/2011 01:57 PM, Matthias Bolte wrote: >> Accept all types on deserialization in order to accept all Event subtypes. >> >> This will be used for the upcoming domain event support. >> --- >>  src/esx/esx_vi_generator.

Re: [libvirt] [PATCH] time_t is not a long on FreeBSD, need to add casts

2011-05-14 Thread Matthias Bolte
2011/5/13 Eric Blake : > On 05/12/2011 11:53 PM, Matthias Bolte wrote: >> --- >>  src/conf/domain_conf.c |    6 +++--- >>  1 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c >> index d3

Re: [libvirt] [PATCH] stream: avoid use-after-free

2011-05-14 Thread Matthias Bolte
2011/5/13 Eric Blake : > virFDStreamClose used a mutex after it was freed, and failed > to destroy that mutex on its last use. > > * src/fdstream.c (virFDStreamFree): Inline into sole caller... > (virFDStreamClose): ...to avoid use-after-free and leak. > Reported by Matthias B

Re: [libvirt] [PATCH] phyp: avoid a crash

2011-05-14 Thread Matthias Bolte
2011/5/12 Eric Blake : > This has been present since the introduction of phypAttachDevice > in commit 444fd07a. > > * src/phyp/phyp_driver.c (phypAttachDevice): Don't dereference > NULL. > --- > > Found by clang, but the NULL dereference is very blatant. > > However, I'm worried that this patch, wh

Re: [libvirt] libvirt, FreeBSD portability inquiry

2011-05-14 Thread Matthias Bolte
2011/5/14 Jason Helfman : > On Sat, May 14, 2011 at 08:45:41AM +0200, Matthias Bolte thus spake: >> >> 2011/5/14 Jason Helfman : >>> >>> On Sat, May 14, 2011 at 08:25:13AM +0200, Matthias Bolte thus spake: >>>> >>>> 2011/5/14 Jason Helfm

Re: [libvirt] libvirt, FreeBSD portability inquiry

2011-05-13 Thread Matthias Bolte
2011/5/14 Jason Helfman : > On Sat, May 14, 2011 at 08:25:13AM +0200, Matthias Bolte thus spake: >> >> 2011/5/14 Jason Helfman : >>> >>> On Fri, May 13, 2011 at 08:38:58AM +0200, Matthias Bolte thus spake: >>>> >>>> 2011/5/12 Jason Helfman

Re: [libvirt] [PATCH] command: Fix compilation on FreeBSD

2011-05-13 Thread Matthias Bolte
2011/5/14 Jason Helfman : > On Sat, May 14, 2011 at 07:01:06AM +0200, Matthias Bolte thus spake: >> >> 2011/5/13 Eric Blake : >>> >>> On 05/12/2011 11:53 PM, Matthias Bolte wrote: >>>> >>>> kill, SIGTERM and SIGKILL require additional hea

Re: [libvirt] libvirt, FreeBSD portability inquiry

2011-05-13 Thread Matthias Bolte
2011/5/14 Jason Helfman : > On Fri, May 13, 2011 at 08:38:58AM +0200, Matthias Bolte thus spake: >> >> 2011/5/12 Jason Helfman : >>> >>> Hi, >>> >>> I am interested in porting libvirt to FreeBSD, and am curious if there >>> may >>

Re: [libvirt] [PATCH] command: Fix compilation on FreeBSD

2011-05-13 Thread Matthias Bolte
2011/5/13 Eric Blake : > On 05/12/2011 11:53 PM, Matthias Bolte wrote: >> kill, SIGTERM and SIGKILL require additional headers. >> --- >>  src/util/command.c |    2 ++ >>  1 files changed, 2 insertions(+), 0 deletions(-) >> >> diff --git a/src/util/command.

Re: [libvirt] [PATCH] virsh: Fix uninitialized variable warning

2011-05-13 Thread Matthias Bolte
2011/5/13 Daniel P. Berrange : > On Fri, May 13, 2011 at 08:29:00AM +0200, Matthias Bolte wrote: >> Reported on FreeBSD only. >> --- >>  tools/virsh.c |    2 +- >>  1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/tools/virsh.c b/tools/v

[libvirt] [PATCH] apparmor: Fix compilation by removing remains from virCommand conversion

2011-05-13 Thread Matthias Bolte
Commit aaf20355b87d3bfda7579a7f6a4a978e848635c3 was incomplete here and missed to remove some parts. --- Pushing this one under the build breaker rule. src/security/security_apparmor.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/security/security_apparmor.c b

Re: [libvirt] [PATCH] configure: Fix mpath check on non-Linux systems

2011-05-13 Thread Matthias Bolte
2011/5/13 Daniel P. Berrange : > On Fri, May 13, 2011 at 07:51:24AM +0200, Matthias Bolte wrote: >> --- >>  configure.ac |   14 +- >>  1 files changed, 9 insertions(+), 5 deletions(-) >> >> diff --git a/configure.ac b/configure.ac >> index a2ce97

Re: [libvirt] libvirt, FreeBSD portability inquiry

2011-05-12 Thread Matthias Bolte
2011/5/12 Jason Helfman : > Hi, > > I am interested in porting libvirt to FreeBSD, and am curious if there may > be anything that may not be possible at this point in respect to the libvirt > source code to be aware of. Here is the log of the build of the software: > > I know it has been ported to

[libvirt] [PATCH] virsh: time_t is not a long on FreeBSD

2011-05-12 Thread Matthias Bolte
localtime_r expects time_t. --- tools/virsh.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 3baa015..93a504e 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -10406,7 +10406,8 @@ cmdSnapshotList(vshControl *ctl, const vshCmd *c

[libvirt] [PATCH] virsh: Fix uninitialized variable warning

2011-05-12 Thread Matthias Bolte
Reported on FreeBSD only. --- tools/virsh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index fbeb7c8..3baa015 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -11131,7 +11131,7 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)

[libvirt] [PATCH] time_t is not a long on FreeBSD, need to add casts

2011-05-12 Thread Matthias Bolte
--- src/conf/domain_conf.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d3efec6..875f90e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9115,7 +9115,7 @@ virDomainSnapshotDefPtr virDomainS

[libvirt] [PATCH] command: Fix compilation on FreeBSD

2011-05-12 Thread Matthias Bolte
kill, SIGTERM and SIGKILL require additional headers. --- src/util/command.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/util/command.c b/src/util/command.c index b488d55..b2a873b 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -22,9 +22,11 @@ #includ

[libvirt] [PATCH] configure: Fix mpath check on non-Linux systems

2011-05-12 Thread Matthias Bolte
--- configure.ac | 14 +- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index a2ce97e..4f5c2d7 100644 --- a/configure.ac +++ b/configure.ac @@ -1667,11 +1667,15 @@ if test "$with_storage_scsi" = "check"; then fi AM_CONDITIONAL([WITH_STOR

Re: [libvirt] [PATCH] remote generator: Add skipgen/autogen flags to .x files

2011-05-11 Thread Matthias Bolte
2011/5/12 Eric Blake : > On 05/11/2011 01:28 PM, Matthias Bolte wrote: >> Make procedure parsing more robust, by allowing arbitrary >> amounts of whitespaces. >> >> Also make some error messages more verbose. >> --- >>  cfg.mk                       |    2 +-

[libvirt] [PATCH] remote generator: Add skipgen/autogen flags to .x files

2011-05-11 Thread Matthias Bolte
Make procedure parsing more robust, by allowing arbitrary amounts of whitespaces. Also make some error messages more verbose. --- cfg.mk |2 +- daemon/remote_generator.pl | 165 --- src/remote/qemu_protocol.x |5 +- src/remote/remote_protocol.x | 46

Re: [libvirt] [PATCH 4/5] remote generator: Make parsing stricter

2011-05-10 Thread Matthias Bolte
2011/5/9 Eric Blake : > On 05/07/2011 06:28 AM, Matthias Bolte wrote: >> Anchor matches at the beginning of a line. >> >> Specialize some general matches. >> >> Add some comments to special cases. >> --- >>  daemon/remote_generator.pl |  172 >>

Re: [libvirt] [PATCH 3/5] remote generator: Unify unsigned int notation in .x files

2011-05-10 Thread Matthias Bolte
2011/5/9 Eric Blake : > On 05/07/2011 06:28 AM, Matthias Bolte wrote: >> Rename u_int and unsigned to unsigned int. This gets rid of some special >> case code in the generator. >> --- >>  daemon/remote_generator.pl   |   10 +++--- >>  sr

Re: [libvirt] [PATCH 2/5] remote generator: Fix comment ignoring regex

2011-05-10 Thread Matthias Bolte
2011/5/9 Eric Blake : > On 05/07/2011 06:28 AM, Matthias Bolte wrote: >> --- >>  daemon/remote_generator.pl |    4 ++-- >>  1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl >> index

Re: [libvirt] [PATCH 1/5] Rename internal DumpXML functions to GetXMLDesc

2011-05-10 Thread Matthias Bolte
2011/5/9 Eric Blake : > On 05/07/2011 06:28 AM, Matthias Bolte wrote: >> This matches the public API and helps to get rid of some speical case > > s/speical/special/ > >> code in the remote generator. >> >> Rename driver API functions and XDR protocol structs.

Re: [libvirt] [PATCH 4/6 V4] inject-nmi: Implementing the remote protocol

2011-05-10 Thread Matthias Bolte
2011/5/10 Eric Blake : > On 05/10/2011 02:26 AM, Lai Jiangshan wrote: >> --- >>  daemon/remote_generator.pl   |    2 +- >>  src/remote/remote_driver.c   |    2 +- >>  src/remote/remote_protocol.x |    8 +++- >>  src/remote_protocol-structs  |    4 >>  4 files changed, 13 insertions(+), 3 d

Re: [libvirt] [PATCH 5/5] remote generator: Move blacklist to a file and add explicit whitelist

2011-05-10 Thread Matthias Bolte
2011/5/10 Daniel P. Berrange : > On Tue, May 10, 2011 at 05:23:23PM +0200, Matthias Bolte wrote: >> 2011/5/10 Daniel P. Berrange : >> > On Mon, May 09, 2011 at 03:45:29PM -0600, Eric Blake wrote: >> >> On 05/07/2011 06:28 AM, Matthias Bolte wrote: >>

Re: [libvirt] [PATCH 00/12] esx: Generator improvments and general cleanups

2011-05-10 Thread Matthias Bolte
2011/5/1 Matthias Bolte : > As we're currently in feature freeze, this series is meant for 0.9.2. > > It includes mostly generator improvments and general cleanups. > > 10/12 is a race condition fix, but it's not critical because it's not > that simple to trigger

Re: [libvirt] [PATCH 5/5] remote generator: Move blacklist to a file and add explicit whitelist

2011-05-10 Thread Matthias Bolte
2011/5/10 Daniel P. Berrange : > On Mon, May 09, 2011 at 03:45:29PM -0600, Eric Blake wrote: >> On 05/07/2011 06:28 AM, Matthias Bolte wrote: >> > --- >> >  daemon/Makefile.am                 |   20 - >> >  daemon/qemu_dispatch.blacklist     |    3 +

Re: [libvirt] [PATCH] Fix two uninitialized variable warnings

2011-05-10 Thread Matthias Bolte
2011/5/10 Wen Congyang : > At 05/10/2011 02:40 PM, Matthias Bolte Write: >> gcc only reports them when compiling with -O3. > > I compile libvirt with -O3, and recieve the same warnings. > ACK. > Thanks, pushed. Matthias -- libvir-list mailing list libvir-list@redhat.com h

Re: [libvirt] [PATCH v3 1/8] screenshot: Defining the public API

2011-05-10 Thread Matthias Bolte
2011/5/10 Michal Privoznik : > Add public API for taking screenshots of current domain console. > > * include/libvirt/libvirt.h.in: add virDomainScreenshot > * src/libvirt_public.syms: Export new symbol > --- >  include/libvirt/libvirt.h.in |    7 +++ >  src/libvirt_public.syms      |    5

[libvirt] [PATCH] Fix two uninitialized variable warnings

2011-05-09 Thread Matthias Bolte
gcc only reports them when compiling with -O3. --- src/util/interface.c |2 +- tools/virsh.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/interface.c b/src/util/interface.c index 5e1987a..04a922c 100644 --- a/src/util/interface.c +++ b/src/util/inte

Re: [libvirt] [PATCH 5/5] remote generator: Move blacklist to a file and add explicit whitelist

2011-05-09 Thread Matthias Bolte
2011/5/9 Eric Blake : > On 05/07/2011 06:28 AM, Matthias Bolte wrote: >> --- >>  daemon/Makefile.am                 |   20 - >>  daemon/qemu_dispatch.blacklist     |    3 + >>  daemon/qemu_dispatch.whitelist     |    1 + >>  daemon/remote_dispatch.black

Re: [libvirt] [PATCH] apparmor: Fix uninitalized variable warning in virt-aa-helper

2011-05-09 Thread Matthias Bolte
2011/5/8 Jamie Strandboge : > On Sat, 7 May 2011 13:13:41 +0200, Matthias Bolte > wrote: >> --- >>  src/security/virt-aa-helper.c |    2 +- >>  1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/src/security/virt-aa-helper.c > b/src/sec

Re: [libvirt] [PATCH] virsh: Correctly initialize libvirt

2011-05-09 Thread Matthias Bolte
2011/5/9 Jiri Denemark : > virsh didn't call virInitialize(), which (among other things) > initializes virLastErr thread local variable. As a result of that, virsh > could just segfault in virEventRegisterDefaultImpl() since that is the > first call that touches (resets) virLastErr. > > I have no i

[libvirt] Potential problems in virFDStreamClose

2011-05-07 Thread Matthias Bolte
virFDStreamClose calls virFDStreamFree that frees fdst, but virFDStreamClose access fdst->lock after that. virFDStreamClose doesn't destroy fdst->lock. static int virFDStreamClose(virStreamPtr st) { struct virFDStreamData *fdst = st->privateData; int ret; VIR_DEBUG("st=%p", st);

[libvirt] [PATCH 5/5] remote generator: Move blacklist to a file and add explicit whitelist

2011-05-07 Thread Matthias Bolte
--- daemon/Makefile.am | 20 - daemon/qemu_dispatch.blacklist |3 + daemon/qemu_dispatch.whitelist |1 + daemon/remote_dispatch.blacklist | 37 daemon/remote_dispatch.whitelist | 169 +++ daemon/remote_generator.

[libvirt] [PATCH 4/5] remote generator: Make parsing stricter

2011-05-07 Thread Matthias Bolte
Anchor matches at the beginning of a line. Specialize some general matches. Add some comments to special cases. --- daemon/remote_generator.pl | 172 +++- 1 files changed, 105 insertions(+), 67 deletions(-) diff --git a/daemon/remote_generator.pl b/daemo

[libvirt] [PATCH 3/5] remote generator: Unify unsigned int notation in .x files

2011-05-07 Thread Matthias Bolte
Rename u_int and unsigned to unsigned int. This gets rid of some special case code in the generator. --- daemon/remote_generator.pl | 10 +++--- src/remote/remote_protocol.x | 72 +- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/daem

[libvirt] [PATCH 1/5] Rename internal DumpXML functions to GetXMLDesc

2011-05-07 Thread Matthias Bolte
This matches the public API and helps to get rid of some speical case code in the remote generator. Rename driver API functions and XDR protocol structs. No functional change included outside of the remote generator. --- daemon/remote_generator.pl |6 +--- src/driver.h

[libvirt] [PATCH 2/5] remote generator: Fix comment ignoring regex

2011-05-07 Thread Matthias Bolte
--- daemon/remote_generator.pl |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl index b06e51a..8d62c37 100755 --- a/daemon/remote_generator.pl +++ b/daemon/remote_generator.pl @@ -380,7 +380,7 @@ elsif ($opt_b) {

[libvirt] [PATCH 0/5] Improvements for the remote generator

2011-05-07 Thread Matthias Bolte
Adds whitelists and moves black and whitelists to their own files. Also makes parsing stricter and more uniform. Matthias -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCHv2 6/3] build: rebuild generated files after rpcgen_fix.pl tweak

2011-05-07 Thread Matthias Bolte
2011/5/7 Eric Blake : > Noticed this while trying to run rpcgen on cygwin. > > * src/Makefile.am ($(srcdir)/remote/%_protocol.h) > ($(srcdir)/remote/%_protocol.c): Add a dependency. > --- ACK. Matthias -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/lib

Re: [libvirt] [PATCHv2 5/3] build: fix VPATH builds

2011-05-07 Thread Matthias Bolte
2011/5/7 Eric Blake : > * src/Makefile.am (REMOTE_DRIVER_GENERATED): Generated files > should live in $(srcdir). Update rules to reflect this. > --- > > This still doesn't fix the fact that 'make dist' under WITH_REMOTE > false is broken, but one thing at a time. > >  src/Makefile.am |   37 +++

Re: [libvirt] [PATCHv2 4/3] build: translate generated strings

2011-05-07 Thread Matthias Bolte
2011/5/7 Eric Blake : > Make sure that xgettext scans generated files for translatable > strings, rather than just files stored in libvirt.git. > > * .gnulib: Update, for bootstrap and syntax-check fixes. > * bootstrap: Resynchronize with gnulib. > * cfg.mk (generated_files): Define. > * po/POTFILE

[libvirt] [PATCH] apparmor: Fix uninitalized variable warning in virt-aa-helper

2011-05-07 Thread Matthias Bolte
--- src/security/virt-aa-helper.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index a4e8549..e481095 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -245,7 +245,7 @@ update

Re: [libvirt] [PATCHv2 3/3] build: Remove all generated RPC files from GIT

2011-05-06 Thread Matthias Bolte
2011/5/6 Eric Blake : > From: Daniel P. Berrange > > Stop storing the generated files for the remote protocol client > and server in source control. The generated files will still be > included in the result of 'make dist' to avoid end-users needing > to generate the files > > Unfortunately, this

Re: [libvirt] [PATCHv2 2/3] build: refactor generated RPC files

2011-05-06 Thread Matthias Bolte
2011/5/6 Eric Blake : > From: Daniel P. Berrange > > Always generate the rpc files, and require rpcgen during bootstrap. > > * daemon/Makefile.am: Removed generated files with >  maintainer-clean target > * src/Makefile.am: Removed generated files with >  maintainer-clean target. Always run 'rpcge

Re: [libvirt] [PATCHv2 1/3] build: rename generated files to .h, for automake's sake

2011-05-06 Thread Matthias Bolte
2011/5/6 Eric Blake : > In preparation for removing generated files, it is necessary > to tell automake that the generated files must be distributed > but not directly compiled (since they are included into the > body of a larger .c file that is compiled).  Hence, even though > these files are code

Re: [libvirt] [PATCH 00/22] Extend remote generator to generate function bodies too

2011-05-06 Thread Matthias Bolte
2011/5/6 Eric Blake : > On 05/06/2011 08:32 AM, Matthias Bolte wrote: >> To be really sure, we might add a whitelist aside the backlist and >> once the generator sees something that's not on one of the lists it >> complains with an error that tells the programmer to eit

Re: [libvirt] [PATCH 00/22] Extend remote generator to generate function bodies too

2011-05-06 Thread Matthias Bolte
2011/5/6 Daniel P. Berrange : > On Sun, Apr 24, 2011 at 11:13:47AM +0200, Matthias Bolte wrote: >> Richard W.M. Jones suggested [1] that the code that directly deals with the >> XDR protocol should be generated. The remote_generate_stubs.pl script >> already generates all

Re: [libvirt] [PATCH] maint: avoid comparisons to bool constants

2011-05-05 Thread Matthias Bolte
2011/5/5 Eric Blake : > HACKING already mentions that comparisons against literal 'true' > are unsafe; for consistency, also shorten comparisons against 'false'. > > * src/conf/domain_conf.c (virDomainNetDefParseXML): Simplify. > * src/nwfilter/nwfilter_gentech_driver.c > (virNWFilterDomainFWUpdate

Re: [libvirt] [PATCH 7/8] Implement basic virDomainGetState in all drivers

2011-05-05 Thread Matthias Bolte
2011/5/4 Jiri Denemark : > Reason is currently always set to 0 (i.e., *_UNKNOWN). > --- >  src/esx/esx_driver.c       |   54 - >  src/libxl/libxl_driver.c   |   31 +- >  src/lxc/lxc_driver.c       |   33 ++- >  src/openvz/openvz_driver.c |   32 ++

Re: [libvirt] [PATCH] rm daemon/remote_dispatch_table.h

2011-05-05 Thread Matthias Bolte
2011/5/5 Daniel P. Berrange : > On Thu, May 05, 2011 at 10:58:38AM +0200, Matthias Bolte wrote: >> 2011/5/5 Daniel P. Berrange : >> > On Thu, May 05, 2011 at 02:59:39PM +0800, Daniel Veillard wrote: >> >> On Thu, May 05, 2011 at 02:31:57PM +0800, Hu Tao wrote: >>

Re: [libvirt] [PATCH 00/22] Extend remote generator to generate function bodies too

2011-05-05 Thread Matthias Bolte
2011/4/24 Matthias Bolte : > Richard W.M. Jones suggested [1] that the code that directly deals with the > XDR protocol should be generated. The remote_generate_stubs.pl script > already generates all the headers, just the bodies in the daemon and remote > driver are manually written.

Re: [libvirt] [PATCH] rm daemon/remote_dispatch_table.h

2011-05-05 Thread Matthias Bolte
2011/5/5 Daniel P. Berrange : > On Thu, May 05, 2011 at 10:58:38AM +0200, Matthias Bolte wrote: >> 2011/5/5 Daniel P. Berrange : >> > On Thu, May 05, 2011 at 02:59:39PM +0800, Daniel Veillard wrote: >> >> On Thu, May 05, 2011 at 02:31:57PM +0800, Hu Tao wrote: >>

Re: [libvirt] [PATCH] rm daemon/remote_dispatch_table.h

2011-05-05 Thread Matthias Bolte
2011/5/5 Daniel P. Berrange : > On Thu, May 05, 2011 at 02:59:39PM +0800, Daniel Veillard wrote: >> On Thu, May 05, 2011 at 02:31:57PM +0800, Hu Tao wrote: >> > On Thu, May 05, 2011 at 08:07:49AM +0200, Matthias Bolte wrote: >> > > 2011/5/5 Hu Tao : >> > >

Re: [libvirt] [PATCH] rm daemon/remote_dispatch_table.h

2011-05-04 Thread Matthias Bolte
2011/5/5 Hu Tao : > 1. this file is automatically generated at compile-time, so rm it >   to avoid further commit to this file. > 2. any update should made to file src/remote/remote_protocol.x. > --- >  daemon/remote_dispatch_table.h | 1054 > >  1 files cha

Re: [libvirt] [PATCH] esx: avoid null dereference on error

2011-05-04 Thread Matthias Bolte
2011/5/4 Daniel Veillard : > On Wed, May 04, 2011 at 08:38:43AM +0200, Matthias Bolte wrote: >> 2011/5/4 Laine Stump : >> > On 05/03/2011 03:10 PM, Eric Blake wrote: >> >> >> >> Detected by clang. >> >> >> >> * src/esx/esx_driver.c

Re: [libvirt] [PATCH] esx: remove dead store

2011-05-04 Thread Matthias Bolte
2011/5/4 Eric Blake : > On 05/04/2011 01:16 AM, Matthias Bolte wrote: >> >> This fixes the problem, but I prefer the attached patch. > > As do I.  ACK to your version. > Thanks, pushed. Matthias -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com

Re: [libvirt] [PATCH] esx: remove dead store

2011-05-04 Thread Matthias Bolte
.c > index 9ef947c..640e984 100644 > --- a/src/esx/esx_util.c > +++ b/src/esx/esx_util.c > @@ -2,7 +2,7 @@ >  /* >  * esx_util.c: utility functions for the VMware ESX driver >  * > - * Copyright (C) 2010 Red Hat, Inc. > + * Copyright (C) 2010-2011 Red Hat, Inc. >  * C

Re: [libvirt] [PATCH] esx: avoid null dereference on error

2011-05-03 Thread Matthias Bolte
, but just going to cleanup results in freeing static strings here. Patch 1 fixes it correctly. Actually this code has been there for a while now, but didn't do anything useful with the queried values because of the format mismatch between libvirt and ESX. Therefore, patch 2 disables that code b

Re: [libvirt] [Libvirt-announce] Libvirt 0.9.1 week freeze, RC2 version to test

2011-05-02 Thread Matthias Bolte
2011/5/2 Daniel Veillard : >  I have made a release candidate 2 version, > >  ftp://libvirt.org/libvirt/libvirt-0.9.1-rc2.tar.gz > > Assuming everything goes fine I will try to push the release on Wed, > if there is a problem, an rc3 and an end of week release is also > possible, but hopefully that

Re: [libvirt] [libvirt-users] [Libvir] libvirt & vde_switch

2011-05-01 Thread Matthias Bolte
2011/5/1 Robert Šmol : > I am now trying to compile the stuff, but I get: > ... >  CCLD   libvirt_driver_nwfilter.la > libtool: link: require no space between `-L' and `/usr/lib' > make[3]: *** [libvirt_driver_nwfilter.la] Error 1 > make[3]: Leaving directory `/home/rsmol/Code/libvirt/src' > make[2

[libvirt] [PATCH] esx: Whitespace cleanup in the generator

2011-05-01 Thread Matthias Bolte
Break long lines and change spacing of keyword arguments to match Python style standards better. No functional change included. --- src/esx/esx_vi_generator.py | 369 -- 1 files changed, 246 insertions(+), 123 deletions(-) diff --git a/src/esx/esx_vi_gene

[libvirt] [PATCH] esx: Change some alignments in the input file

2011-05-01 Thread Matthias Bolte
No functional change included. --- src/esx/esx_vi_generator.input | 122 1 files changed, 61 insertions(+), 61 deletions(-) diff --git a/src/esx/esx_vi_generator.input b/src/esx/esx_vi_generator.input index d927e68..361a6e7 100644 --- a/src/esx/esx_vi_gen

[libvirt] [PATCH] esx: Simplify some esxVI_Boolean to bool

2011-05-01 Thread Matthias Bolte
--- src/esx/esx_driver.c |6 ++ src/esx/esx_vi.c | 34 +++--- src/esx/esx_vi.h | 12 +--- 3 files changed, 22 insertions(+), 30 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 89240dc..4a9f474 100644 --- a/src/esx

[libvirt] [PATCH] esx: Convert autoAnswer from esxVI_Boolean to a simple bool

2011-05-01 Thread Matthias Bolte
Just true/false is good enough for it. Also use it directly from the parsed URI instead of caching it in esxPrivate. --- src/esx/esx_driver.c | 52 - src/esx/esx_private.h|1 - src/esx/esx_storage_driver.c | 12 ++--- src/esx/esx_

[libvirt] [PATCH] esx: Fix race condition in esxVI_EnsureSession

2011-05-01 Thread Matthias Bolte
When the session has expired then multiple threads can race while reestablishing it. This race condition is not that critical as it requires a special usage pattern to be triggerd. It can only happen when an application doesn't do API calls for quite some time (the session expires after 30 min ina

[libvirt] [PATCH] esx: Change generated method parameter autobinding

2011-05-01 Thread Matthias Bolte
Instead of specifing the type of the managed object directly specify the ServiceContent member name. This way the mapping dictionary can be removed. --- src/esx/esx_vi_generator.input | 36 ++-- src/esx/esx_vi_generator.py| 28 ++-- 2

[libvirt] [PATCH] esx: Remove 1000 lines of generated but unused code

2011-05-01 Thread Matthias Bolte
Don't make all object and enum types (de)serializable by default. Detect this from the input file instead. --- src/esx/esx_vi_generator.py | 167 +++--- 1 files changed, 123 insertions(+), 44 deletions(-) diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_

[libvirt] [PATCH] esx: Improve dynamic cast detection in the generator

2011-05-01 Thread Matthias Bolte
Detect it based on usage as parameter, return type and member of other object types. --- src/esx/esx_vi_generator.py | 32 ++-- 1 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py index 70cf2ee..0d

[libvirt] [PATCH] esx: Move the Event type from the VI generator to manually written code

2011-05-01 Thread Matthias Bolte
Accept all types on deserialization in order to accept all Event subtypes. This will be used for the upcoming domain event support. --- src/esx/esx_vi_generator.input | 21 src/esx/esx_vi_generator.py|1 - src/esx/esx_vi_types.c | 100 ++

[libvirt] [PATCH 00/12] esx: Generator improvments and general cleanups

2011-05-01 Thread Matthias Bolte
As we're currently in feature freeze, this series is meant for 0.9.2. It includes mostly generator improvments and general cleanups. 10/12 is a race condition fix, but it's not critical because it's not that simple to trigger. Matthias -- libvir-list mailing list libvir-list@redhat.com https://

[libvirt] [PATCH] esx: Refactor common code in the generator

2011-05-01 Thread Matthias Bolte
Move common code from Property and Paramater into new Member class. Rename the other base class to Type. --- src/esx/esx_vi_generator.py | 95 +-- 1 files changed, 38 insertions(+), 57 deletions(-) diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_v

[libvirt] [PATCH] esx: Generate implicit _this macros

2011-05-01 Thread Matthias Bolte
--- src/Makefile.am |1 + src/esx/esx_vi_generator.py | 48 -- src/esx/esx_vi_methods.c| 40 +++ 3 files changed, 32 insertions(+), 57 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index

[libvirt] [PATCH] esx: Improve list usage detection in the generator

2011-05-01 Thread Matthias Bolte
Detect it based on usage as parameter and return type too. --- src/esx/esx_vi_generator.py | 41 +++-- 1 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py index 8ac1249..70cf2ee 100755 ---

Re: [libvirt] [PATCH v2] tests: Lower stack usage below 4096 bytes

2011-04-30 Thread Matthias Bolte
2011/4/30 Eric Blake : > On 04/30/2011 05:10 AM, Matthias Bolte wrote: >> Make virtTestLoadFile allocate the buffer to read the file into. >> >> Fix logic error in virtTestLoadFile, stop reading on the first empty line. >> >> Use virFileReadLimFD in virtTestCap

Re: [libvirt] [PATCH] tests: Update valgrind suppressions file

2011-04-30 Thread Matthias Bolte
2011/4/30 Eric Blake : > On 04/30/2011 05:13 AM, Matthias Bolte wrote: >> --- >>  tests/.valgrind.supp |   58 >> +++-- >>  1 files changed, 51 insertions(+), 7 deletions(-) >> >> diff --git a/tests/.valgrind.supp

Re: [libvirt] [PATCH] nwfilter: Fix memory leak in the ebtables subdriver

2011-04-30 Thread Matthias Bolte
2011/4/30 Eric Blake : > On 04/30/2011 05:12 AM, Matthias Bolte wrote: >> Call shutdown functions for all subcompontents in nwfilterDriverShutdown. > > s/subcompontents/subcomponents/ (twice) Fixed. >> +++ b/src/conf/nwfilter_conf.c >> @@ -125,6 +125,7 @@ struct int_m

Re: [libvirt] [PATCH] Fix memory leak in __virExec

2011-04-30 Thread Matthias Bolte
2011/4/30 Eric Blake : > On 04/30/2011 05:11 AM, Matthias Bolte wrote: >> Commit e0d014f2379dd made binary potentially allocated on the heap. >> It was freed in the parent in the error path, but not in the success path >> that doesn't goto the cleanup label. >> >

Re: [libvirt] [PATCH] qemu: Fix qemuDomainModifyDeviceFlags leaking the caps bitmap

2011-04-30 Thread Matthias Bolte
2011/4/30 Eric Blake : > On 04/30/2011 05:12 AM, Matthias Bolte wrote: >> --- >>  src/qemu/qemu_driver.c |    1 + >>  1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c >> index b277cc5..a19c4a7

[libvirt] [PATCH] Fix memory leak in __virExec

2011-04-30 Thread Matthias Bolte
Commit e0d014f2379dd made binary potentially allocated on the heap. It was freed in the parent in the error path, but not in the success path that doesn't goto the cleanup label. Found by 'make -C tests valgrind'. --- src/util/util.c |4 1 files changed, 4 insertions(+), 0 deletions(-)

[libvirt] [PATCH] tests: Update valgrind suppressions file

2011-04-30 Thread Matthias Bolte
--- tests/.valgrind.supp | 58 +++-- 1 files changed, 51 insertions(+), 7 deletions(-) diff --git a/tests/.valgrind.supp b/tests/.valgrind.supp index 4af10b1..68cfa0c 100644 --- a/tests/.valgrind.supp +++ b/tests/.valgrind.supp @@ -258,14 +258,58 @@

[libvirt] [PATCH] qemu: Fix qemuDomainModifyDeviceFlags leaking the caps bitmap

2011-04-30 Thread Matthias Bolte
--- src/qemu/qemu_driver.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b277cc5..a19c4a7 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4316,6 +4316,7 @@ endjob: vm = NULL; cleanup:

[libvirt] [PATCH] nwfilter: Fix memory leak in the ebtables subdriver

2011-04-30 Thread Matthias Bolte
Call shutdown functions for all subcompontents in nwfilterDriverShutdown. Make sure that this shutdown functions can safely be called multiple times and independent from the actual subcompontents state. --- src/conf/nwfilter_conf.c|8 src/nwfilter/nwfilter_driver.c |

Re: [libvirt] [PATCH 2/2] build: fix getcwd portability problems

2011-04-29 Thread Matthias Bolte
2011/4/29 Eric Blake : > On 04/29/2011 11:48 AM, Matthias Bolte wrote: >>> +++ b/tests/testutils.c >>> @@ -478,7 +478,6 @@ int virtTestMain(int argc, >>>                  int (*func)(void)) >>>  { >>>     int ret; >>> -    char cwd

Re: [libvirt] [PATCH 2/2] build: fix getcwd portability problems

2011-04-29 Thread Matthias Bolte
2011/4/29 Eric Blake : > * bootstrap.conf (gnulib_modules): Add getcwd-lgpl. > * tests/commandtest.c (checkoutput): Drop unused cwd. > * tests/commandhelper.c (main): Let getcwd malloc. > * tests/testutils.c (virTestMain): Likewise. > * tools/virsh.c (cmdPwd): Likewise. > (virshCmds): Expose cmdPwd

Re: [libvirt] [PATCH 1/2] tests: simplify common setup

2011-04-29 Thread Matthias Bolte
2011/4/29 Eric Blake : > A few of the tests were missing basic sanity checks, while most > of them were doing copy-and-paste initialization (in fact, some > of them pasted the argc > 1 check more than once!).  It's much > nicer to do things in one common place, and minimizes the size of > the next

Re: [libvirt] [Libvirt-announce] Libvirt 0.9.1 week freeze, RC1 version to test

2011-04-29 Thread Matthias Bolte
2011/4/28 Eric Blake : > On 04/28/2011 01:33 AM, Matthias Bolte wrote: >> libvirt compiles fine but virsh has a warning about vfprintf: >> >> virsh.c: In function 'vshDebug': >> virsh.c:12105:5: warning: function might be possible candidate for >> &#x

Re: [libvirt] [PATCH] virsh: avoid compiler warning on mingw

2011-04-29 Thread Matthias Bolte
.c:12105:5: warning: function might be possible candidate for > 'ms_printf' format attribute [-Wmissing-format-attribute] > > since mingw hasn't yet added gcc attributes to vfprintf. > > * tools/virsh.c (vshDebug): Avoid vfprintf. > (vshPrintExtra): Use lighter-we

Re: [libvirt] [PATCH] build: avoid test warnings on mingw

2011-04-29 Thread Matthias Bolte
2011/4/29 Eric Blake : > * .gnulib: Update to latest, for getaddrinfo fixes. > Reported by Matthias Bolte. > --- > > As promised, I've done the gnulib side of the mingw cleanups > affecting the issues Matthias found with 0.9.1-rc1. > > Oh, and now that gnulib getcwd

Re: [libvirt] [Libvirt-announce] Libvirt 0.9.1 week freeze, RC1 version to test

2011-04-28 Thread Matthias Bolte
2011/4/28 Daniel Veillard : >  So we are entering the week freeze for the new version. > I have made an rc1 tarball available at: >  ftp://libvirt.org/libvirt/libvirt-0.9.1-rc1.tar.gz > >  I have tried it locally and basic operations seems to work fine, > please give it a try too, > >  thanks ! > >

Re: [libvirt] [PATCH] esx: Fix dynamic dispatch for CastFromAnyType functions

2011-04-27 Thread Matthias Bolte
2011/4/27 Daniel Veillard : > On Wed, Apr 27, 2011 at 09:35:32AM +0200, Matthias Bolte wrote: >> 2011/4/27 Daniel Veillard : >> >  Not sure I fully understand but looks regular and okay, ACK :-) >> > >> > Daniel >> > >> >> Actually, thi

Re: [libvirt] [PATCH] esx: Fix dynamic dispatch for CastFromAnyType functions

2011-04-27 Thread Matthias Bolte
2011/4/27 Daniel Veillard : > On Mon, Apr 25, 2011 at 01:32:43PM +0200, Matthias Bolte wrote: >> 2011/4/25 Matthias Bolte : >> > This was broken by the refactoring in ac1e6586ec75. It resulted in a >> > segfault for 'virsh vol-dumpxml' and related volume func

Re: [libvirt] [PATCH] Move call to virReportOOMError into virFileBuildPath

2011-04-27 Thread Matthias Bolte
2011/4/26 Laine Stump : > On 04/24/2011 05:48 AM, Matthias Bolte wrote: >> >> Suggested by Daniel P. Berrange >> --- >>  src/conf/nwfilter_conf.c |    5 + >>  src/conf/storage_conf.c  |    7 +-- >>  src/util/util.c          |    2 ++ >>  

Re: [libvirt] [PATCH 00/22] Extend remote generator to generate function bodies too

2011-04-27 Thread Matthias Bolte
2011/4/27 Daniel Veillard : > On Sun, Apr 24, 2011 at 11:13:47AM +0200, Matthias Bolte wrote: >> Richard W.M. Jones suggested [1] that the code that directly deals with the >> XDR protocol should be generated. The remote_generate_stubs.pl script >> already generates all

Re: [libvirt] [PATCH] Fix small memory leaks in config parsing related functions

2011-04-25 Thread Matthias Bolte
2011/4/25 Eric Blake : > On 04/24/2011 04:26 PM, Matthias Bolte wrote: >> Found by 'make -C tests valgrind'. >> >> xen_xm.c: Dummy allocation via virDomainChrDefNew is directly >> overwritten and lost. Free 'script' in success path too. >>

Re: [libvirt] [PATCH] Add virDomainEventRebootNew

2011-04-25 Thread Matthias Bolte
2011/4/25 Eric Blake : > On 04/25/2011 05:36 AM, Matthias Bolte wrote: >> This will be used in the ESX driver event handling. >> --- >>  src/conf/domain_event.c |    8 >>  src/conf/domain_event.h |    1 + >>  2 files changed, 9 insertions(+), 0 deletio

Re: [libvirt] [PATCH] tests: Lower stack usage below 4096 bytes

2011-04-25 Thread Matthias Bolte
2011/4/25 Matthias Bolte : > 2011/4/25 Eric Blake : >> On 04/24/2011 04:26 PM, Matthias Bolte wrote: >>> Make virtTestLoadFile allocate the buffer to read the file into. >>> >>> Fix logic error in virtTestLoadFile, stop reading on the an empty l

<    4   5   6   7   8   9   10   11   12   13   >