Re: [libvirt] [PATCH v1 2/2] command: Change virCommandAddEnv so it replaces existing environment variables.

2012-09-25 Thread Richard W.M. Jones
On Mon, Sep 24, 2012 at 02:24:23PM -0600, Eric Blake wrote: > On 09/24/2012 02:16 PM, Richard W.M. Jones wrote: > > Unfortunately this patch does not fix the bug, but it now > > fails in a different, and stranger way: > > > > libvir: error : libvirtd quit during handshake: Input/output error > >

Re: [libvirt] [PATCH v1 2/2] command: Change virCommandAddEnv so it replaces existing environment variables.

2012-09-24 Thread Eric Blake
On 09/24/2012 12:54 PM, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > --- > src/util/command.c | 17 - > 1 file changed, 16 insertions(+), 1 deletion(-) > Any new feature deserves tests; I'm pushing this under the trivial rule. diff --git c/tests/commandtest.c

Re: [libvirt] [PATCH v1 2/2] command: Change virCommandAddEnv so it replaces existing environment variables.

2012-09-24 Thread Eric Blake
On 09/24/2012 02:16 PM, Richard W.M. Jones wrote: > > On Mon, Sep 24, 2012 at 02:07:36PM -0600, Eric Blake wrote: >> On 09/24/2012 01:53 PM, Richard W.M. Jones wrote: >> > +/* Search for the name in the existing environment. */ > +namelen = strcspn(env, "="); Would 'strch

Re: [libvirt] [PATCH v1 2/2] command: Change virCommandAddEnv so it replaces existing environment variables.

2012-09-24 Thread Richard W.M. Jones
On Mon, Sep 24, 2012 at 02:07:36PM -0600, Eric Blake wrote: > On 09/24/2012 01:53 PM, Richard W.M. Jones wrote: > > >>> +/* Search for the name in the existing environment. */ > >>> +namelen = strcspn(env, "="); > >> > >> Would 'strchr(env, '=') - env' be any more efficient? But that's a

Re: [libvirt] [PATCH v1 2/2] command: Change virCommandAddEnv so it replaces existing environment variables.

2012-09-24 Thread Eric Blake
On 09/24/2012 01:53 PM, Richard W.M. Jones wrote: >>> +/* Search for the name in the existing environment. */ >>> +namelen = strcspn(env, "="); >> >> Would 'strchr(env, '=') - env' be any more efficient? But that's a >> micro-optimization, probably not worth worrying about. > > I guess I

Re: [libvirt] [PATCH v1 2/2] command: Change virCommandAddEnv so it replaces existing environment variables.

2012-09-24 Thread Richard W.M. Jones
On Mon, Sep 24, 2012 at 01:49:37PM -0600, Eric Blake wrote: > On 09/24/2012 12:54 PM, Richard W.M. Jones wrote: > > From: "Richard W.M. Jones" > > > > --- > > src/util/command.c | 17 - > > 1 file changed, 16 insertions(+), 1 deletion(-) > > > > diff --git a/src/util/command.

Re: [libvirt] [PATCH v1 2/2] command: Change virCommandAddEnv so it replaces existing environment variables.

2012-09-24 Thread Eric Blake
On 09/24/2012 12:54 PM, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > --- > src/util/command.c | 17 - > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/src/util/command.c b/src/util/command.c > index f7d92dd..354e526 100644 > --- a/src/util/comma

[libvirt] [PATCH v1 2/2] command: Change virCommandAddEnv so it replaces existing environment variables.

2012-09-24 Thread Richard W.M. Jones
From: "Richard W.M. Jones" --- src/util/command.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/util/command.c b/src/util/command.c index f7d92dd..354e526 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -985,11 +985,26 @@ virCommandNonblo