On 2025-01-12 12:26, Lasse Collin wrote:
The patch makes readdir() detect that lossless conversion isn't
possible and inform the application with EOVERFLOW

Wouldn't EILSEQ be more appropriate? That's what "open" is supposed to do with names that the file system doesn't support.

Also, the POSIX spec suggests that readdir should return a null pointer right away with errno set, rather than wait for the end of the directory. A subsequent readdir resumes traversal of the directory, even after such an error. Doing it this nicer way should avoid the need for the new label and goto, and it would also let the caller count how many bad entries the directory has.


Reply via email to