Re: [libvirt] [PATCH 03/11] util: Add a util to traverse directory tree

2013-06-19 Thread Osier Yang
On 19/06/13 21:44, John Ferlan wrote: On 06/07/2013 01:03 PM, Osier Yang wrote: There is POSIX calls to walk through direcotry tree, nftw(3), but s/is/are s/direcotry/directory s/tree/trees or s/tree/a tree/ hm... I reviewed it times before posting it. :( there is no way to allow one to

Re: [libvirt] [PATCH 03/11] util: Add a util to traverse directory tree

2013-06-19 Thread John Ferlan
On 06/07/2013 01:03 PM, Osier Yang wrote: > There is POSIX calls to walk through direcotry tree, nftw(3), but s/is/are s/direcotry/directory s/tree/trees or s/tree/a tree/ > there is no way to allow one to pass user data to the callback: > > int nftw(const char *dirpath, > int (*fn) (c

[libvirt] [PATCH 03/11] util: Add a util to traverse directory tree

2013-06-07 Thread Osier Yang
There is POSIX calls to walk through direcotry tree, nftw(3), but there is no way to allow one to pass user data to the callback: int nftw(const char *dirpath, int (*fn) (const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf), int nopenfd,