Re: [Libguestfs] [PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.

2016-12-08 Thread Richard W.M. Jones
On Wed, Dec 07, 2016 at 06:07:00PM +0100, Pino Toscano wrote: > This implementation looks a bit inefficient to me (recursive, moving It's inefficient (O(n^2)), but not because of recursion -- GCC can turn the code into a loop using TCO. > bytes and using strlen for every char removed, etc). What

Re: [Libguestfs] [PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.

2016-12-07 Thread Pino Toscano
On Tuesday, 6 December 2016 09:46:25 CET Richard W.M. Jones wrote: > For example, converts "///usr//local//" -> "/usr/local". > --- > src/inspect-fs-unix.c | 52 > +++ > 1 file changed, 52 insertions(+) > > diff --git a/src/inspect-fs-unix.c

[Libguestfs] [PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.

2016-12-06 Thread Richard W.M. Jones
For example, converts "///usr//local//" -> "/usr/local". --- src/inspect-fs-unix.c | 52 +++ 1 file changed, 52 insertions(+) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index a1a757c..0fea9c8 100644 --- a/src/inspect-fs-unix.c +++