On Fri, 16 Feb 2018 11:20:33 +0100 Antonios Motakis <antonios.mota...@huawei.com> wrote:
<snip> > > I'm not that sure that we can make the assumption that all entries in a > dir will share the st_dev, The assumption stands for any entry that is not a directory actually. But indeed a directory could be a mount point, and have a different st_dev. > I think we have to check it for each entry... > Only if the entry might be a directory, ie, dent->d_type == DT_DIR || dent->d_type == DT_UNKNOWN > > > >> Also, POSIX permits returning specific errno codes that aren't otherwise > >> listed for a syscall if the usual semantics of that errno code are > >> indeed the reason for the failure (you should prefer to fail with errno > >> codes documented by POSIX where possible, but POSIX does not limit you > >> to just that set). > >> > > Ok, then ENFILE wouldn't be that bad in the end. > > > > Thanks for your POSIX expertise :) > Will keep that one then! > > > > > Cheers, > > > > -- > > Greg >