[vlc-devel] [PATCH] linux: vlc_memfd: handle EOPNOTSUPP errno
thomas at gllm.fr
Fri Jun 14 11:11:33 CEST 2019
On Fri, Jun 14, 2019, at 10:25, Rémi Denis-Courmont wrote:
> Le vendredi 14 juin 2019, 10:17:16 EEST Thomas Guillem a écrit :
> > from manpage:
> > BUGS
> > One must check for two different error codes, EISDIR and ENOENT, when trying
> > to determine whether the kernel supports O_TMPFILE functionality.
> This is obviously incorrect. Feel free to patch the man pages.
No, I won't.
This is not a problem of manpages, but a problem with older libc/kernel implementation/bugs around O_TMPFILE.
EISDIR and ENOENT are expected to be checked in order to test if TMPFILE is supported.
As you can see O_TMPFILE feature was not added smoothly.
> The error code is:
> - ENOENT if /tmp does not exist,
> - EISDIR if /tmp exists and O_TMPFILE is ignored,
> - EOPNOTSUPP /tmp exists, O_TMPFILE is not ignored and the file system does not
> support O_TMPFILE.
> In fact, we could just as well remove the special handling of ENOENT, because
> the mkstemp() fallback is not going to work if /tmp does not exist.
> Rémi Denis-Courmont
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel