[libvirt] [PATCH 0/9] eliminate almost all uses of strerror

2009-02-02 Thread Jim Meyering
We know that strerror is not thread-safe, so I'm eliminating all uses from code that might be multi-threaded. I started the job with this patch: http://thread.gmane.org/gmane.comp.emulators.libvirt/11532 Here are the summaries of the upcoming change sets: eliminate strerror qemu_driver.c:

[libvirt] [PATCH 1/9] eliminate strerror qemu_driver.c: use virReportSystemError instead

2009-02-02 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * src/qemu_driver.c (qemudSetCloseExec): Don't use qemudLog here. Now, every caller diagnoses the failure. Simplify, now that there's no logging. * src/qemu_driver.c (qemudSetNonBlock): Rewrite not to use qemudLog. --- src/qemu_driver.c | 126

[libvirt] [PATCH 4/9] iptables.c: Use virStrerror, not strerror.

2009-02-02 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * src/iptables.c: Include virterror_internal.h. Use virStrerror, not strerror. * src/virterror.c (virStrerror): Remove static. * src/virterror_internal.h (virStrerror): Declare it. --- src/iptables.c | 25 -

[libvirt] [PATCH 2/9] remove duplicate *SetCloseExec and *SetNonBlock functions

2009-02-02 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * src/qemu_driver.c: Use virSetCloseExec and virSetNonBlock, rather than qemuSet* functions. Suggested by Daniel P. Berrange. * src/util.c (virSetCloseExec): Compile unconditionally. * src/util.h (virSetCloseExec): Declare libvirtd: link with libvirt_util,

[libvirt] [PATCH 5/9] qemud.c: use virStrerror, not strerror

2009-02-02 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com --- qemud/qemud.c | 65 +--- 1 files changed, 43 insertions(+), 22 deletions(-) diff --git a/qemud/qemud.c b/qemud/qemud.c index fa5e17d..48083df 100644 --- a/qemud/qemud.c +++ b/qemud/qemud.c @@ -231,8

[libvirt] [PATCH 3/9] report OOMError

2009-02-02 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com --- src/qemu_driver.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/qemu_driver.c b/src/qemu_driver.c index c40fda4..599af0b 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -462,8 +462,7 @@ qemudStartup(void) {

[libvirt] [PATCH 9/9] syntax-check: avoid spurious false-positive

2009-02-02 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * src/iptables.c (notifyRulesUpdated): Use %s rather than string-concatenation that made sc_unmarked_diagnostics report a false-positive. --- src/iptables.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iptables.c

[libvirt] [PATCH 7/9] remove remainder of offending strerror uses

2009-02-02 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * qemud/qemud.c (GET_CONF_STR): Use virStrerror, not strerror. * qemud/remote.c (remoteDispatchDomainBlockPeek): Likewise. (remoteDispatchDomainMemoryPeek, remoteDispatchAuthSaslInit): Likewise. (remoteDispatchAuthPolkit): Likewise. * src/lxc_container.c

[libvirt] [PATCH 6/9] don't include raw errno in diagnostics

2009-02-02 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * src/uml_driver.c (umlStartVMDaemon): Don't print raw errno value. * qemud/remote.c (remoteDispatchAuthSaslInit): Likewise. --- qemud/remote.c | 10 +- src/uml_driver.c | 22 +++--- 2 files changed, 16 insertions(+), 16

[libvirt] [PATCH 8/9] syntax-check: enable prohibit_nonreentrant

2009-02-02 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * .x-sc_prohibit_nonreentrant: Add src/console.c and virterror.c. * Makefile.cfg (local-checks-to-skip): Don't exempt sc_prohibit_nonreentrant. --- .x-sc_prohibit_nonreentrant |4 +++- Makefile.cfg|1 - 2 files changed, 3

Re: [libvirt] [PATCH] COW storage volume compile fix

2009-02-02 Thread Jim Meyering
Markus Armbruster arm...@redhat.com wrote: Commit 2d4381d0 broke compilation for !HAVE_QEMU_IMG HAVE_QCOW_CREATE. Fix that. --- Compile-tested only. ACK. IMHO, for a compile-time failure, that's fine. diff --git a/src/storage_backend_fs.c b/src/storage_backend_fs.c ... -if

Re: [libvirt] [PATCH] Fix more printf(%s, NULL) usage

2009-02-02 Thread Jim Meyering
john.le...@sun.com wrote: diff --git a/src/libvirt.c b/src/libvirt.c --- a/src/libvirt.c +++ b/src/libvirt.c @@ -2871,7 +2871,9 @@ virDomainMigratePrepare (virConnectPtr d const char *dname, unsigned long bandwidth) { -

Re: [libvirt] [PATCH] Fix more printf(%s, NULL) usage

2009-02-02 Thread John Levon
On Mon, Feb 02, 2009 at 07:17:29PM +0100, Jim Meyering wrote: Thought note that we like continuation lines to be aligned with the opening parenthesis, i.e., VIR_DEBUG(dconn=%p, cookie=%p, cookielen=%p, uri_in=%s, uri_out=%p, flags=%lu, dname=%s, bandwidth=%lu, dconn,

[libvirt] [PATCH]: cleanup: remove useless if-before-VIR_FREE

2009-02-02 Thread Jim Meyering
Jim Meyering j...@meyering.net wrote: Guido Günther a...@sigxcpu.org wrote: attached patch removes the hardcoded port 22 when going through ssh, ssh uses it by default. This makes it easier to override this via .ssh/config on a per host basis instead of having to add this to the connection

Re: [libvirt] failed test on Fedora 8

2009-02-02 Thread Jim Meyering
John Levon le...@movementarian.org wrote: On Fri, Jan 30, 2009 at 08:07:53PM +0100, Jim Meyering wrote: Obviously, the testing framework should report the failure to open the .args file: Here's the patch to do that: Great, but this applies to all the other test programs too As mentioned,

[libvirt] virGetLastError() disagrees with virConnGetLastError()

2009-02-02 Thread John Levon
If you edit virsh sources, you should find that on 'virsh dump Domain-0 /var/tmp/foo', the conn error is correctly set, but the thread-load error is not set. Isn't this a bug? regards john -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] eliminate strerror from qemu_driver.c: use virReportSystemError instead

2009-02-02 Thread Daniel P. Berrange
On Mon, Feb 02, 2009 at 11:38:33AM +0100, Jim Meyering wrote: Jim Meyering j...@meyering.net wrote: Daniel P. Berrange berra...@redhat.com wrote: On Thu, Jan 29, 2009 at 09:54:59PM +0100, Jim Meyering wrote: diff --git a/src/qemu_driver.c b/src/qemu_driver.c You can actually just kill off

Re: [libvirt] [PATCH] eliminate strerror from qemu_driver.c: use virReportSystemError instead

2009-02-02 Thread Jim Meyering
Jim Meyering j...@meyering.net wrote: Daniel P. Berrange berra...@redhat.com wrote: On Thu, Jan 29, 2009 at 09:54:59PM +0100, Jim Meyering wrote: diff --git a/src/qemu_driver.c b/src/qemu_driver.c You can actually just kill off the SetNonBlock method, since we added one to util.h. We should