Pádraig Brady <[email protected]> writes:

> This static value might be too much or too little.
> Hmm I see the inotify man page states the above is sufficient.
> I was thinking of caching fpathconf(dirfd, _PC_NAME_MAX) if available,
> but I suppose one could have other file systems (bind) mounted
> in the parent dir, in which case the current FS limit wouldn't be appropriate.
>
> Also I was worried about the portability of NAME_MAX
> (which is not available on Solaris for example).
> However NAME_MAX should be available where inotify is (Linux/FreeBSD).
>
> I'd add a short comment about that though. Something like.
>
> /* NAME_MAX covers that max length of all file systems
>    that might be mounted in the parent dir, and the define
>    should be available any where that inotify is.  */

Yep, I considered fpathconf as well, but my thinking was that outside of
reading the code itself, the man pages would be the most authoritative

> The explicit cleanup_ call above is redundant,
> and will result in it being called twice upon skip.

Thanks for the review. I pushed it with that change and the others you
suggested [1].

Collin

[1] 
https://github.com/coreutils/coreutils/commit/83545af2a876fc9653dcd984e5f8eeef05711661

Reply via email to