Re: [libvirt] [PATCH 2/3] util: Introduce virFileComparePaths

2017-02-10 Thread Erik Skultety
> > + * Returns 0 if the paths are equal, 1 if they're not or -1 in case of an > > + * error. > > + */ > > +int > > +virFileComparePaths(const char *p1, const char *p2) > > I think this be "virFileCompareResolvedPaths" - change all the places... > Better representation than just ComparePaths >

Re: [libvirt] [PATCH 2/3] util: Introduce virFileComparePaths

2017-02-09 Thread John Ferlan
On 02/07/2017 09:16 AM, Erik Skultety wrote: > So rather than comparing 2 paths (strings) as they are, which can very > easily lead to unnecessary errors (e.g. in storage driver) that the paths > are not the same when in fact they'd be e.g. just symlinks to the same > location, we should put our

[libvirt] [PATCH 2/3] util: Introduce virFileComparePaths

2017-02-07 Thread Erik Skultety
So rather than comparing 2 paths (strings) as they are, which can very easily lead to unnecessary errors (e.g. in storage driver) that the paths are not the same when in fact they'd be e.g. just symlinks to the same location, we should put our best effort into resolving any symlinks and