[libvirt] [PATCH 0/5] phyp: Cleanups and memory leak fixes

2011-04-09 Thread Matthias Bolte
This series covers several things I came across while improving the semantic of phypVolumeGetKey. Matthias -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 4/5] phyp: Fix too small buffer allocation in phypAttachDevice

2011-04-09 Thread Matthias Bolte
sizeof(domain-name) is the wrong thing. Instead of using strdup here rewrite escape_specialcharacters to allocate the buffer itself. Add a contains_specialcharacters to be used in phypOpen, as phypOpen is not interested in the escaped version. --- src/phyp/phyp_driver.c | 90

[libvirt] [PATCH 1/5] phyp: Remove stack allocating a 4kb volume key and fix related memory leaks

2011-04-09 Thread Matthias Bolte
Don't pre-allocate 4kb per key, make phypVolumeGetKey allocate the memory. Make phypBuildVolume return the volume key instead of using pre-allocated memory to store it. Also fix a memory leak in phypVolumeLookupByName when phypVolumeGetKey fails. Fix another memory leak in phypVolumeLookupByPath

[libvirt] [PATCH 2/5] phyp: Reduce code duplication in error and success paths

2011-04-09 Thread Matthias Bolte
Also fix memory leaks along the way in phypCreateServerSCSIAdapter and phypAttachDevice. --- src/phyp/phyp_driver.c | 592 +++- 1 files changed, 289 insertions(+), 303 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index

[libvirt] [PATCH 5/5] phyp: Don't overwrite error from virDomainDeviceDefParse by OOM error

2011-04-09 Thread Matthias Bolte
--- src/phyp/phyp_driver.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 226946d..f36b357 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -2000,7 +2000,6 @@ phypAttachDevice(virDomainPtr domain,

[libvirt] [PATCH v2] xen: Remove PATH_MAX sized stack allocation from block stats code

2011-04-09 Thread Matthias Bolte
--- src/xen/block_stats.c | 51 + 1 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/xen/block_stats.c b/src/xen/block_stats.c index e7c80c9..1918257 100644 --- a/src/xen/block_stats.c +++ b/src/xen/block_stats.c @@ -113,34

[libvirt] [PATCH 3/5] phyp: Don't try to use a string from a failed virAsprintf

2011-04-09 Thread Matthias Bolte
--- src/phyp/phyp_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index f441261..24165fb 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -210,7 +210,7 @@ phypGetSystemType(virConnectPtr conn)

[libvirt] [PATCH] migrate VMs between different-endian hosts

2011-04-09 Thread Stefan Berger
This patch enables the migration of Qemu VMs between hosts of different endianess. I tested this by migrating a i686 VM between a x86 and ppc64 host. I am converting the 'int's in the VM's state header to uint32_t assuming this doesn't break compatibility with existing deployments other than

Re: [libvirt] [PATCH v2] xen: Remove PATH_MAX sized stack allocation from block stats code

2011-04-09 Thread Daniel Veillard
On Sat, Apr 09, 2011 at 12:05:17PM +0200, Matthias Bolte wrote: --- src/xen/block_stats.c | 51 + 1 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/xen/block_stats.c b/src/xen/block_stats.c index e7c80c9..1918257 100644