[vlc-devel] [PATCH] linux: vlc_memfd: handle EOPNOTSUPP errno

Rémi Denis-Courmont remi at remlab.net
Fri Jun 14 10:25:15 CEST 2019

Le vendredi 14 juin 2019, 10:17:16 EEST Thomas Guillem a écrit :
> from manpage:
> 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.
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

More information about the vlc-devel mailing list