Re: [Spice-devel] [vdagent-linux v2 2/2] vdagent: Favour access() over stat()

2019-01-30 Thread Christophe Fergeau
On Wed, Jan 30, 2019 at 01:43:51PM +0100, Christophe Fergeau wrote: > Hey, > > On Wed, Jan 30, 2019 at 01:36:40PM +0100, Jakub Janku wrote: > > > diff --git a/src/vdagent/vdagent.c b/src/vdagent/vdagent.c > > > index ff3328c..b077d1d 100644 > > > --- a/src/vdagent/vdagent.c > > > +++ b/src/vdagent

Re: [Spice-devel] [vdagent-linux v2 2/2] vdagent: Favour access() over stat()

2019-01-30 Thread Christophe Fergeau
Hey, On Wed, Jan 30, 2019 at 01:36:40PM +0100, Jakub Janku wrote: > > diff --git a/src/vdagent/vdagent.c b/src/vdagent/vdagent.c > > index ff3328c..b077d1d 100644 > > --- a/src/vdagent/vdagent.c > > +++ b/src/vdagent/vdagent.c > > @@ -20,6 +20,7 @@ > > */ > > #include > > > > +#include > > Wh

Re: [Spice-devel] [vdagent-linux v2 2/2] vdagent: Favour access() over stat()

2019-01-30 Thread Jakub Janku
Hi, On Wed, Jan 30, 2019 at 1:23 PM Christophe Fergeau wrote: > > vdagent.c has a 'file_test' function which tests for the existence of > the /dev entry for the spicevmc channel. This commit reworks it to give > it a better name, to make it return a boolean, and to use access() > rather than stat

[Spice-devel] [vdagent-linux v2 2/2] vdagent: Favour access() over stat()

2019-01-30 Thread Christophe Fergeau
vdagent.c has a 'file_test' function which tests for the existence of the /dev entry for the spicevmc channel. This commit reworks it to give it a better name, to make it return a boolean, and to use access() rather than stat() which makes the goal of that function more obvious. Signed-off-by: Chr